Skip to content

Instantly share code, notes, and snippets.

@mbakaitis
mbakaitis / DefaultKeyBinding.dict
Created February 24, 2022 04:29 — forked from trusktr/DefaultKeyBinding.dict
My DefaultKeyBinding.dict for Mac OS X
/* ~/Library/KeyBindings/DefaultKeyBinding.Dict
This file remaps the key bindings of a single user on Mac OS X 10.5 to more
closely match default behavior on Windows systems. This makes the Command key
behave like Windows Control key. To use Control instead of Command, either swap
Control and Command in Apple->System Preferences->Keyboard->Modifier Keys...
or replace @ with ^ in this file.
Here is a rough cheatsheet for syntax.
Key Modifiers
@mbakaitis
mbakaitis / recursionAlternative.js
Last active July 24, 2023 01:25
Bad Things: Recursive event listener creation
// a way to recurse through ports until an open port is found
// based upon the Node.js documentation
var http = require('http');
var listenerCounter = 1;
var port = 8000;
var HTTPserver = http.createServer(function (request, response) {