willcodeforfoo /.bash_profile

#
# Aliases
alias ll="ls -lhFG"
alias ls="ls -FG"
alias dir="ll"
alias gemlist='gem list | egrep -v "^( |$)"'
alias top='top -ocpu'

alias mbp='mate ~/.bash_profile'
alias sbp='source ~/.bash_profile'

alias gb='git branch'
alias gba='git branch -a'
alias gcav='git commit -av'
alias gca='git commit -a'
alias gd='git diff | mate'
alias gl='git pull origin master'
alias gp='git push origin master'
alias gp?='git log --pretty=oneline origin/master..HEAD'
alias gs='git status'
alias gpcd='git push origin master && cap deploy'
alias gpom='git pull origin master'
alias update_sfcportal='cd vendor/plugins/sfc_portal/ && git remote update && git merge origin/master && cd ../../..'
alias irb='irb --simple-prompt'
alias stop_mysql='sudo launchctl unload -w /Library/LaunchDaemons/com.mysql.mysqld.plist'
alias start_mysql='sudo launchctl load -w /Library/LaunchDaemons/com.mysql.mysqld.plist'
alias ttr='touch tmp/restart.txt'
alias git='hub'

#
# Functions
apply_ssh()
{
  ssh $1 "cat >> ~/.ssh/authorized_keys" < ~/.ssh/id_rsa.pub
}

pman()
{
  man -t "${1}" | open -f -a /Applications/Preview.app/
}

#
# Shell options
shopt -s histappend
set +o histexpand     # enable strings with !

#
# Env variables
export PATH="~/bin:/Users/kmarsh/homebrew/bin:/Users/kmarsh/homebrew/sbin:/usr/local/pgsql/bin:/Library/Frameworks/GDAL.framework/Programs:/usr/local/bin:/opt/local/bin:/opt/local/sbin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
export MANPATH="/opt/local/share/man:$MANPATH"
export HISTSIZE=100000
export HISTFILESIZE=409600
export HISTIGNORE="cd:ls:[bf]g:clear:exit:gp:gs:ll"
export HISTCONTROL=ignoredups
export EDITOR="mate_wait"
export VISUAL="mate_wait"
export PAGER="less"
export CLICOLOR="yes"
export JAVA_HOME='/System/Library/Frameworks/JavaVM.framework/Home'
export JRUBY_HOME="~/bin/jruby"
export PROMPT_COLOR='1;1;40m';

source ~/.snippets

export GEM_HOME=/Library/Ruby/Gems/1.8
export GEM_PATH=/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8

# Tab completion for ssh hosts, from:
#  http://feeds.macosxhints.com/~r/macosxhints/recent/~3/257065700/article.php
complete -W "$(echo `cat ~/.ssh/known_hosts | cut -f 1 -d ' ' | sed -e s/,.*//g | uniq | grep -v "\["`;)" ssh

source ~/.git-completion.sh
#export PS1='\[\e[1m\][\t] \W$(__git_ps1 " (%s)")\$\[\e[m\] '
export PS1='\[\e[1m\]\W$(__git_ps1 " (%s)")\$\[\e[m\] '
#export PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ '

source ~/.amazon_keys
export EC2_HOME=~/.ec2
export PATH=$PATH:$EC2_HOME/bin
export EC2_PRIVATE_KEY=`ls $EC2_HOME/pk-*.pem`
export EC2_CERT=`ls $EC2_HOME/cert-*.pem`
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home/

if [ -f /opt/local/etc/bash_completion ]; then
    . /opt/local/etc/bash_completion
fi

# . ~/tmp/git-prompt/git-prompt.sh
 
if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi
  
# EOF