Skip to content

Instantly share code, notes, and snippets.

@mfa
mfa / post-commit
Created July 10, 2012 12:06 — forked from consti/post-commit
Take a photo of you, whenever you make a commit (linux version)
#!/bin/sh
#
# Take a photo of you, whenever you make a commit
#
# This is an improved version of Víctor Martínez original post:
# http://coderwall.com/p/xlatfq
#
# Improvements:
# * This is non-blocking (you dont have to wait for your image to be taken)
@mfa
mfa / gist:227894
Created November 6, 2009 10:23 — forked from augustjoki/gist:31867
# version for bash 2.03
# no use of =~ and BASH_REMATCH allowed
function parse_git_branch {
if [[ `uname -s` == "SunOS" ]]; then
return 1
fi
if git rev-parse --git-dir >/dev/null 2>&1
then
git_status="$(git status 2> /dev/null)"
remote_pattern="# Your branch is "