Skip to content

Instantly share code, notes, and snippets.



  • San Francisco, CA
View GitHub Profile
obfusk /
Last active Apr 27, 2022
python "breakpoint" (more or less equivalent to ruby's binding.pry); for a proper debugger, use
import code; code.interact(local=dict(globals(), **locals()))
tgrrtt /
Last active Aug 29, 2015
New Ubuntu Setup w/ Nginx & Upstart
curl -sL | sudo bash - &&
sudo apt-get install -y nodejs
sudo apt-get update &&
sudo apt-get install nginx &&
sudo apt-get install git
## upgrade aps and resolve deps with the more important ones
sudo apt-get dist-upgrade
#chagne to root
View quicksort.js
var quicksort = function(A) {
var swap = function(a, b) {
var temp = A[a];
A[a] = A[b];
A[b] = temp;
var partition = function(left, right) {
var pivotIndex = Math.floor((left + right) / 2);
malarkey / Contract Killer
Last active May 18, 2022
The latest version of my ‘killer contract’ for web designers and developers
View Contract Killer

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008


kentbrew / favicon-interceptor.js
Created Jan 3, 2011
How to short-circuit those annoying favicon requests in node.js
View favicon-interceptor.js
// early experiments with node had mysterious double requests
// turned out these were for the stoopid favicon
// here's how to short-circuit those requests
// and stop seeing 404 errors in your client console
var http = require('http');
http.createServer(function (q, r) {
// control for favicon