Skip to content

Instantly share code, notes, and snippets.

View gist:6443
# Video:
Hi everyone, I'm Chris Wanstrath.
When Jeremy asked me to come talk, I said yes. Hell yes. Immediately. But
then I took a few moments and thought, Wait, why? Why me? What am I supposed
to say that's interesting? Something about Ruby, perhaps. Maybe the
future of it. The future of something, at least. That sounds
jed / LICENSE.txt
Created May 20, 2011 — forked from 140bytes/LICENSE.txt
generate random UUIDs
View LICENSE.txt
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
defunkt / gitio
Created Sep 11, 2011
Turn a URL into a URL.
View gitio
#!/usr/bin/env ruby
# Usage: gitio URL [CODE]
# Turns a URL
# into a URL
# Copies the URL to your clipboard.
url = ARGV[0]
code = ARGV[1]
jlong / uri.js
Created Apr 20, 2012
URI Parsing with Javascript
View uri.js
var parser = document.createElement('a');
parser.href = "";
parser.protocol; // => "http:"
parser.hostname; // => ""
parser.port; // => "3000"
parser.pathname; // => "/pathname/"; // => "?search=test"
parser.hash; // => "#hash"; // => ""
View gist:5075355
My thoughts on writing tiny reusable modules that each do just one
thing. These notes were adapted from an email I recently sent.
If some component is reusable enough to be a module then the
maintenance gains are really worth the overhead of making a new
project with separate tests and docs. Splitting out a reusable
component might take 5 or 10 minutes to set up all the package
overhead but it's much easier to test and document a piece that is
yyx990803 /
Last active Jun 29, 2021
npm list only top level modules.
alias ng="npm list -g --depth=0 2>/dev/null"
alias nl="npm list --depth=0 2>/dev/null"
lelandbatey /
Last active Oct 27, 2021
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!


This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"


niksumeiko / git.migrate
Last active Oct 27, 2021
Moving git repository and all its branches, tags to a new remote repository keeping commits history
View git.migrate
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
tonymtz / gist:d75101d9bdf764c890ef
Last active Oct 11, 2021
Uninstall nodejs from OSX Yosemite
View gist:d75101d9bdf764c890ef
# first:
lsbom -f -l -s -pf /var/db/receipts/ | while read f; do sudo rm /usr/local/${f}; done
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following:
# go to /usr/local/lib and delete any node and node_modules
cd /usr/local/lib
sudo rm -rf node*