Skip to content

Instantly share code, notes, and snippets.

Avatar

Georg Sauthoff gsauthof

View GitHub Profile
@nicowilliams
nicowilliams / fork-is-evil-vfork-is-good-afork-would-be-better.md
Last active Jul 18, 2022
fork() is evil; vfork() is goodness; afork() would be better; clone() is stupid
View fork-is-evil-vfork-is-good-afork-would-be-better.md

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

@dcode
dcode / GitHub Flavored Asciidoc (GFA).adoc
Last active Aug 4, 2022
Demo of some useful tips for using Asciidoc on GitHub
View GitHub Flavored Asciidoc (GFA).adoc

GitHub Flavored Asciidoc (GFA)

@rodneyrehm
rodneyrehm / anti-keygrabber.user.js
Last active Jul 5, 2022
GreaseMonkey: Prevent Web Applications From Grabbing Certain HotKeys
View anti-keygrabber.user.js
// ==UserScript==
// @name anti key-grabber
// @description Prevent web apps from capturing and muting vital keyboard shortcuts
// @grant none
// @version 1.1
// ==/UserScript==
(function(){
var isMac = unsafeWindow.navigator.oscpu.toLowerCase().contains("mac os x");
unsafeWindow.document.addEventListener('keydown', function(e) {
if (e.keyCode === 116) {