Skip to content

Instantly share code, notes, and snippets.

@chanian
chanian / gist:1824471
Created February 14, 2012 07:21
that thing
/^(\".+\")=(\".+\")$/.test('":n\"ame"="value"')
console.log(RegExp.$1, RegExp.$2)
@chanian
chanian / gitchanges.sh
Created May 10, 2012 22:59
Show me what I've changed
alias gitchanges='git diff origin/master | grep "+++" | cut -d" " -f2'
@chanian
chanian / gitwho.sh
Created August 9, 2012 03:33
more git stats on a specific file
# chuck this in your ~/.local.bash or ~/.bash_profile
# usage: gitwho filename
function gitwho() {
echo -e "\n File: $1";
echo -n " Last Commit:";
echo -e "\033[35m \c";
git log --relative-date --pretty='%aN (%ad)' -n1 $1;
echo -e "\033[35m \c";
echo -n " - ";
git log -n1 --format="%s" $1;