Skip to content

Instantly share code, notes, and snippets.

View mfukar's full-sized avatar

Michael Foukarakis mfukar

View GitHub Profile
@nicowilliams
nicowilliams / fork-is-evil-vfork-is-good-afork-would-be-better.md
Last active October 7, 2024 14:27
fork() is evil; vfork() is goodness; afork() would be better; clone() is stupid

I recently happened upon a very interesting implementation of popen() (different API, same idea) called popen-noshell using clone(2), and so I opened an issue requesting use of vfork(2) or posix_spawn() for portability. It turns out that on Linux there's an important advantage to using clone(2). I think I should capture the things I wrote there in a better place. A gist, a blog, whatever.

This is not a paper. I assume reader familiarity with fork() in particular and Unix in general, though, of course, I link to relevant wiki pages, so if the unfamiliar reader is willing to go down the rabbit hole, they should be able to come ou

@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active November 14, 2024 15:40
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@errzey
errzey / gist:7414273
Last active January 26, 2016 13:29
Kernel debugging setup notes.

Setting up your KDBG environment for pussies.

Every time I have to setup a new environment, I completely forget the mess you have to go through in order to get your kernel debug world setup properly. So this is here to make sure I won't forget it ever again.

I do not run linux as a desktop, and I suggest that nobody else does. My development consists of OS-X, and VirtualBox with two (almost) identical installations of linux (whatever you want, but I use ubuntu here in my examples). Our secondary VM will be the host which we will be debugging, as in our primary box will attach to it via kgdb.

Step 1

Clone your VM - no need to do a full history copy, just a snapshot clone, call it something that won't confuse you later, like "fucktard69" if your main VM is "shitcocks666". It doesn't matter, shut the fuck up.