Created
January 6, 2014 18:47
-
-
Save adriancuadros/8287485 to your computer and use it in GitHub Desktop.
bash_profile
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
alias profile='subl ~/.bash_profile' | |
alias code='cd ~/Code' | |
alias reserbus='cd ~/Code/innku/reserbus' | |
alias b='bundle exec' | |
alias r='rails' | |
alias co='git checkout' | |
alias pow='cd ~/.pow' | |
alias debug='bundle exec rdebug-c' | |
homebrew=/usr/local/bin:/usr/local/sbin | |
export PATH=$homebrew:$PATH | |
export EDITOR='subl -w' | |
export CLICOLOR=1; | |
export LSCOLORS=ExFxCxDxBxegedabagacad; | |
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="[\[\033[1;32m\]\w\[\033[0m] \[\033[0m\]\[\033[1;36m\]\$(git_branch)\[\033[0;33m\]\$(git_since_last_commit)\[\033[0m\]$ " | |
export PATH="$HOME/.rbenv/bin:$PATH" | |
eval "$(rbenv init -)" | |
### Added by the Heroku Toolbelt | |
export PATH="/usr/local/heroku/bin:$PATH" | |
repeat() { | |
n=$1 | |
shift | |
while [ $(( n -= 1 )) -ge 0 ] | |
do | |
"$@" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment