This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Aliases lets you define shortcuts for common git commands, | |
; so you can type "git st" instead of "git status", for example. | |
[alias] | |
st = status | |
ci = commit --verbose | |
br = branch | |
co = checkout | |
; IMPORTANT! Please specify the same email address here as the one | |
; you use on GitHub! | |
[user] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{ | |
username: 'chreke', | |
url: 'http://allihoopa.com/chreke' | |
}, { | |
username: 'mhallin', | |
url: 'http://allihoopa.com/mhallin' | |
}] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It is amazing what you can accomplish if you do not care who gets the credit. ~ Harry S. Truman | |
If we knew what we were doing, it wouldn't be called research, would it? ~ Albert Einstein | |
Most people would rather die than think; in fact, they do so. ~ Bertrand Russell | |
Experience is the name everyone gives to their mistakes. ~ Oscar Wilde | |
All animals are equal — but some animals are more equal than others. ~ Animal Farm by George Orwell | |
This country has come to feel the same when Congress is in session as when the baby gets hold of a hammer. ~ Will Rogers | |
I think all foreigners should stop interfering in the internal affairs of Iraq. ~ Paul Wolfowitz | |
The law will never make men free; it is men who have got to make the law free. ~ Henry David Thoreau | |
History would be an excellent thing if only it were true. ~ Leo Tolstoy | |
Without friends no one would choose to live, though he had all other goods. ~ Aristotle |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for branch in `git branch -r | grep -v HEAD` | |
do | |
echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch | |
done | sort -r |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git fetch --prune && git branch --merged master | grep -v 'master$' | xargs -n 1 git branch -d |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# Interactively remove branches not in remote, *by name*. This is | |
# useful for pruning branches that were rebased prior to merging, | |
# since those branches will not show up in `git branch --merged`. | |
# List local branches which may have been merged | |
remotes = `git branch -r`.split.map {|x| x.sub('origin/', '') } | |
locals = `git branch`.split.select {|x| x != '*' } | |
complement = locals.select {|x| not (remotes.include? x) } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
OUTPUT=/tmp/$(basename $1).html | |
markdown $1 > $OUTPUT | |
open $OUTPUT | |
# FIXME: This is a hack to prevent deleting the file before it's opened. | |
# Is it possible to use `wait` instead? | |
sleep 1 | |
rm $OUTPUT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Reads JSON from a file or STDIN and outputs CSV to STDOUT. | |
import fileinput | |
import json | |
import sys | |
import csv | |
jsonstr = '' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Quick sketch / spec for how a JSQL module might work | |
var people = [{ | |
'name': 'Mary Jane Watson', | |
'job': 'Actress', | |
'alignment': 'Good', | |
'age': 23 | |
}, { | |
'name': 'Peter Parker', | |
'job': 'Photographer', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# USAGE: | |
# | |
# json-to-csv [filename] | |
# | |
# This script takes a JSON array of objects as its input and outputs | |
# the data as CSV to STDOUT. The JSON array can be fed to the | |
# script either via STDIN or by supplying a filename as an argument. |