Last active
December 10, 2015 00:58
-
-
Save nbrew/4354898 to your computer and use it in GitHub Desktop.
My .bash_login
This file contains 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
export PATH="/usr/local/bin:/usr/local/sbin:$PATH:~/bin:/usr/local/mysql/bin:/usr/local/mongodb/bin:/Users/nathan/workspace/Sandbox/nbrew-git-achievements:/usr/local/android/tools" | |
export MANPATH="/usr/local/man:$PATH" | |
#export CPPFLAGS="-I/opt/local/include -I/Users/nathan/local/include" | |
export LDFLAGS="-L/usr/local/lib" | |
export LD_LIBRARY_PATH="/lib:/usr/lib:/usr/local/lib:/usr/local/mysql/lib" | |
export DISPLAY=:0.0 | |
export SVN_EDITOR=/usr/bin/vim | |
export HISTCONTROL='ignoredupes' | |
export EDITOR=subl | |
#http://www.cyberciti.biz/tips/howto-linux-unix-bash-shell-setup-prompt.html | |
#export PS1="[${LOGNAME}@\h \W]\$ " | |
# Git tab completion | |
# source ~/.git-completion.bash | |
# Show branch in status line | |
PS1='[${LOGNAME}@\h \W$(__git_ps1 " (%s)")]\$ ' | |
export PROMPT_COMMAND='echo -ne "\033]0;${PWD/#$HOME/~}\007"' | |
alias rmsvndirs='find . -name .svn -exec rm -rf {} \;' | |
alias svnadd="svn status | grep '^\?' | sed -e 's/? *//' | sed -e 's/ /\ /g' | xargs svn add" | |
alias svnrm="svn status | grep '^\!' | sed -e 's/! *//' | sed -e 's/ /\ /g' | xargs svn rm" | |
alias getsite='wget -rEpk' | |
alias flushcache='sudo dscacheutil -flushcache' | |
alias throttle_localhost='sudo ipfw pipe 1 config bw 56Kbit/s delay 150ms && sudo ipfw add 1 pipe 1 src-port 3000 && sudo ipfw add 2 pipe 1 dst-port 3000' | |
alias unthrottle_localhost='sudo ipfw delete 1 && sudo ipfw delete 2' | |
# timecard related | |
alias tailtime='tail -n100 ~/Documents/timecard.txt' | |
alias edittime='vim ~/Documents/timecard.txt' | |
alias spec='spec --color --format specdoc' | |
alias updategitmirrors='for gem in `ls /Users/nathan/workspace/pnt/`; do if [[ $gem =~ ^pnt_.*$ ]]; then /Users/nathan/bin/update_git_svn_mirror.sh $gem; fi; done' | |
alias gemrmrspec2='gem uninstall rspec rspec-core rspec-expectations rspec-mocks' | |
alias r='rails' | |
alias git='git-achievements' | |
alias gos='git_or_svn' | |
# pnt common tasks | |
alias ldb='rake pnt:db:load' | |
alias dll_beta_db='cap beta pnt:db:backup && cd shared && git pull && cd .. && rake pnt:db:load' | |
alias dll_production_db='cap production pnt:db:backup && cd shared && git pull && cd .. && rake pnt:db:load' | |
function newgit() { | |
if [ -z "${1}" ]; then | |
echo "usage: newgit dirname"; | |
elif [ -d "${1}" ]; then | |
echo "Directory exists."; | |
else | |
mkdir "${1}" && cd "${1}" && git init "${1}"; | |
fi | |
} | |
function git_or_svn() { | |
if [ -d `pwd`/.svn ]; then echo -n 'svn'; elif [ -d `pwd`/.git ]; then b=`git config --get svn-remote.svn.url`; if [ $? -ne "0" ]; then echo -n 'git'; else echo -n 'git-svn'; fi fi | |
echo; | |
} | |
function subl() { | |
/usr/bin/subl -n ${1:-"."}; | |
} | |
# Terminal Colors | |
export CLICOLOR=1 | |
export LSCOLORS=ExFxCxDxBxegedabagacad | |
# ensure this is the last line in the doc | |
[[ -s $HOME/.rvm/scripts/rvm ]] && source $HOME/.rvm/scripts/rvm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment