Skip to content

Instantly share code, notes, and snippets.

@reecefowell
reecefowell / gist:4602582
Created January 23, 2013 06:25
Git Bash Colours 2.0
parse_git_branch () {
#git name-rev HEAD 2> /dev/null | sed -e 's/\^0$//' | sed 's#HEAD\ \(.*\)# (\1)#'
#git diff --shortstat
#git show --raw --abbrev-commit --date=local
#BR=$(git log --oneline -n 3 2>/dev/null) || { echo "$@"; exit; }
#br=$(git log --oneline -n 5 2>&1) || br=""
xr=$(git diff HEAD --stat 2>&1) || xr=""
br=$(git ph -n 7 2>&1) || br=""
echo "$xr"
echo "$br"
@reecefowell
reecefowell / gist:4595033
Created January 22, 2013 14:28
cat /proc/cpuinfo; cat /etc/lsb-release ; uname -a
~ cat /proc/cpuinfo; cat /etc/lsb-release ; uname -a
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 26
model name : Intel(R) Xeon(R) CPU W3520 @ 2.67GHz
stepping : 5
cpu MHz : 2659.000
cache size : 8192 KB
fdiv_bug : no

Install MAMP Development stack on Mountain Lion using MacPorts

NOTE: I like to prepend some of the commands with time just for curiosity’s sake to see how long it takes.

Turn off the built-in Apache

Go to System Preferences -> Sharing -> uncheck the Personal Web sharing. You will never turn Apache on/off here again.

Install Xcode via Mac App Store

$(this).select2({
tags: $(this).data('tag-license-table'),
tokenSeparators: [",", " "]
})
// values go between braces, and have looking format
// i.e key: value
Here is a longer example with deeper nesting