JamesIsAwkward

u/JamesIsAwkward


r/learnprogramming•

I've been learning C in my spare time for fun and I'm almost finished with my first "major project".

I'm actually a sysadmin by trade who is wanting to dive into "devops" so I'm wanting to learn Rust or Go next. I'm thinking of porting my application from C to Rust/Go and it got me thinking... what is the usual work flow when devs are doing this sort of thing?

I did some googling and learned about the C ABI and how most languages happen to support C code with some crazy linker black magic but I'm just wanting to get an idea of how a normal org would do this.

Would they actually design the code from scratch in the new language using the old code as a "guide"? Or would they try to implem

24

r/PowerShell•

Hey everyone,

I've been going through some of my old scripts, cleaning them up, and rewriting some code that I now know to be bad practice.

I came across some alert scripts, all of which access vastly different sets of data and work on different types of servers. But, I noticed I had copy and pasted some functions that deal with validating email addresses and sending the actual emails.. and this got me thinking.

All of these scripts share the same 25% of their code, and if I ever find an issue with that portion of the code I would have to manually change it for all of them.

Enter modules.

I've been googling today and haven't found any specific answer.

To start, each script had some

720

r/homelab•

pfSense/OPNsense have spoiled me. Having a firewall that is up-to-date without a support agreement is awesome. But... tl;dr my home "server" is getting pretty old and its a power hog. I want to dismantle it until i can find something a bit smaller and more efficient to use.

I'm wondering how long Mikrotik supports their routers and such but I can't find too much info online. It would be really nice to get rid of the pfsense VM and move it all to a hardware router. My server CPU is pretty old too and doesn't support AES-NI, so I'm sure a newer mikrotik could do OpenVPN a lot better as well..

What do you guys think? Have you had good luck with mikrotik routers? What about with OpenVPN? I'm

210

r/Stoicism•

Amor Fati - I love my fate

Stoic Success Story

I've been studying and "practicing" stoicism for a few months now, and I've been dealing with a leaky basement for a 2 years.

2 years ago when I would discover water in my basement after a hard rain I would cuss, I would throw a small fit, it would ruin my mood for a while. I would stress and worry and sometimes lose sleep over it. It seemed everything we tried didn't work. We were really trying to avoid putting in an interior sump pump because our newly finished basement would get wrecked and it would essentially triple the cost of all of the work we had put in to it.

But the last thing we tried worked. It really worked. For a year it didn't leak. It wasn't something I worried about anym

29028

r/networking•

Hey everyone, I'm a sysadmin looking to cobble something together that will last a week tops!

It's been a Monday for sure!

We had a Fortigate dedicated as a phone vpn server. It had an IPSEC tunnel configured and our VPN phones can tunnel in to it. Similar to how a SonicWall GVC setup would work.

The fortigate is dead and I've tried to get a similar setup working with Pfsense and Opnsense with no luck. It seems the fortigate also took care of assigning virtual IPs to the connecting peers/phones as well.

You guys know a solution I can build to get us by? I can't think of any more firewall/vpn solutions off the top of my head that can do this sort of configuration like the fortigate c

75

r/devops•

I'm just trying to see if my method is correct... I mean it works fine but it feels dirty... but I think it might just be my lack of experience.

So let's say this API wants XML data. What I've been doing is (in python) is something like this:

requestXML = """"""
requestXML += '<?xml version="1.0"?>'
requestXML += "<someRootElement>
requestXML +=     "<someElement0>{}</someElement0>".format(element1Data)
requestXML +=     "<someElement1>67890</someElement1>".format(element2Data)
so on and so forth...

I'm just adding in the xml data to this string, line by line, while also formatting them to include the variables I need. Then at

09

r/yubikey•

Do you have know many insertions the Yubikey 5 NFC USB male connector is rated for?

Do you know if I buy a USB NFC reader for my computer if I can just use the NFC function to access my yubikey via the authenticate app and others?

I'm just a bit worried about the wear and tear on the male USB end of the key in the long run I think!

Thank you!

56

r/sysadmin•

Hey guys,

I've been scratching my head at this one for a while and I've tried all kinds of solutions, like here and here but I can't seem to get it to work.

Editing the DefaultLayouts.xml seemed like the way to go but it didn't work for me.

Have any of you accomplished this somehow? Maybe I did my DefaultLayouts.xml file wrong? When I would logon with a new user after editing that file I would still get the usual Edge and Mail icons. (I have the Windows Store one disabled via GP

22

r/GoldandBlack•

If you look at the website there is summary in the Current/Final copy.

"All COVID-19 related executive orders, administrative regulations, other directives issued by the Governor or pursuant to his authority, or agencies or boards under the Governor's authority, not specifically extended by this Act are of no further force or effect as of the effective date of this Act."

I don't think the mask mandate was included in this HJR, so under this logic it should be null.

Passed on the 30th, so why isn't anyone talking about it I wonder?

Maybe I don't understand how the process work and it takes time to implement or something, or the media just doesn't want to talk about it.

Here's

5910

r/AskElectronics•

Long story short I've come up with a neat (at least I think its neat lol) idea for the house. The wife likes to listen to music while she works on projects or cleans or something, and it would be cool to build a "zoned speaker system". I'd like to add a speaker in every room in the house, and then turn on spotify or bluetooth music with a Pi or something and choose the rooms you want to play the music in.

Obviously I'd need to either limit the volume (more so than normal), or limit the max number of speakers at once to avoid overloading my amp since they will all be in parallel.

I'm just trying to think of a decent way to disconnect them. I was thinking maybe relays.. so then I wouldn'

16

r/GoldandBlack•

Mods, sorry if this is a low quality post!

I just thought it would be neat to see what kind of libertarian pieces are out there!

I'm totally asking for a friend and not because I want to get a new tattoo soon... :P

Edit 1: I'm not a fed

Edit 2: Yes, I know that's something a fed would say

Edit 3: How about verbal descriptions or general abstract ideas lol

Edit 4: Okay I give up yall lol

821