Skip to content

Instantly share code, notes, and snippets.

@dryman
Created July 6, 2012 06:30
Show Gist options
  • Save dryman/3058411 to your computer and use it in GitHub Desktop.
Save dryman/3058411 to your computer and use it in GitHub Desktop.
alias ls="ls -G"
source ~/perl5/perlbrew/etc/bashrc
export PATH="/usr/local/Cellar/siege/2.70/bin/:~/bin:/Applications/MATLAB_R2011a.app/bin:$PATH"
function git_branch {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return;
echo "("${ref#refs/heads/}") ";
}
function git_since_last_commit {
now=`date +%s`;
last_commit=$(git log --pretty=format:%at -1 2> /dev/null) || return;
seconds_since_last_commit=$((now-last_commit));
minutes_since_last_commit=$((seconds_since_last_commit/60));
hours_since_last_commit=$((minutes_since_last_commit/60));
minutes_since_last_commit=$((minutes_since_last_commit%60));
echo "${hours_since_last_commit}h${minutes_since_last_commit}m ";
}
PS1="[\[\e[1;32m\]\w\[\e[0m\]]\[\e[1;36m\]\$(git_branch)\[\e[0m\]\n$ "
export PATH="$HOME/Library/Haskell/bin:$PATH"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
export CLASSPATH=$CLASSPATH:/usr/local/Cellar/clojure-contrib/1.2.0/clojure-contrib.jar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment