Skip to content

Instantly share code, notes, and snippets.

@aben
Created May 28, 2013 10:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aben/5661975 to your computer and use it in GitHub Desktop.
Save aben/5661975 to your computer and use it in GitHub Desktop.
alias ls="ls -G"
alias ll="ls -alh"
#alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'
# For MacVim.app, Open each file in a new tab
alias v="mvim --remote-tab-silent"
alias myhost="sudo v /etc/hosts"
alias bashrc="v ~/.bash_profile"
alias cleanhost="sudo dscacheutil -flushcache"
alias py="python"
alias rb="ruby"
alias cpwd="pwd | tr -d '\n' | pbcopy"
# nginx
alias nginxpid="ps -ef | grep 'nginx: master process' | grep -v 'grep' | awk -F ' ' '{print $2}'"
alias nginxlog='cd /usr/local/Cellar/nginx/logs/'
alias nginxconf='v /usr/local/Cellar/nginx/conf/nginx.conf'
alias nginxcheck='sudo nginx -t'
alias nginxreload='sudo nginx -s reload'
alias nginxstart='sudo nginx -c /usr/local/Cellar/nginx/conf/nginx.conf'
alias nginxstop='sudo nginx -s stop'
# PATH
export PATH=/usr/local/sbin:/usr/local/bin:$PATH
# gems path to PATH
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
# Display git branch in bash prompt
#export PS1="\\w:\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)\$ "
WHITE="\[\033[0m\]"
YELLOW="\[\033[0;33m\]"
export PS1="[ \W ]: $YELLOW\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)$WHITE\$ "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment