Skip to content

Instantly share code, notes, and snippets.

@crystalw
Created April 6, 2016 20:38
Show Gist options
  • Select an option

  • Save crystalw/5d88d0f4ec1152ca3d71bb7095f4815f to your computer and use it in GitHub Desktop.

Select an option

Save crystalw/5d88d0f4ec1152ca3d71bb7095f4815f to your computer and use it in GitHub Desktop.
bash aliases
#opens chrome with CORS disabled
alias chromex='/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --disable-web-security'
#removes merged local branches (except for master)
alias gitprune='git branch --merged | grep -v "\*" | grep -v master | xargs -n 1 git branch -d'
#switches to ui project
alias backend="cd ${PWD/ui/backend}"
#switches to backend project
alias ui="cd ${PWD/backend/ui}"
#lists all global level 0 npm packages
alias npmlist='npm list --depth=0 -g'
#pushes to server branch with the same name as your currrent branch
alias gitpush='git push origin $(git rev-parse --abbrev-ref HEAD)'
#opens browser page to origin
alias gitopen='python -m webbrowser -t $(git config --get remote.origin.url)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment