Skip to content

Instantly share code, notes, and snippets.

@BukhariH
Created September 11, 2014 22:01
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 BukhariH/55a286ea28b36361e1db to your computer and use it in GitHub Desktop.
Save BukhariH/55a286ea28b36361e1db to your computer and use it in GitHub Desktop.
.dotfile
alias desktop='cd /Users/Hasnain/Desktop'
alias fs='foreman start'
alias fsdev='foreman start -f Procfile-dev'
alias bu='bundle update'
alias rs='rails s'
alias be='bundle exec'
alias gems='cd /Users/Hasnain/dev/gem'
alias web='cd /Users/Hasnain/dev/web'
alias tmp='cd /Users/Hasnain/dev/tmp'
alias nit='cd /Users/Hasnain/Nitrous'
alias git='hub'
rubo() {
rubocop --auto-gen-config
wget https://gist.githubusercontent.com/BukhariH/9c8043e20b1d6a521327/raw/.rubocop.yml
}
# Easier navigation: .., ..., ...., ....., ~ and -
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."
alias ~="cd ~" # `cd` is probably faster to type though
alias -- -="cd -"
# IP addresses
alias ip="dig +short myip.opendns.com @resolver1.opendns.com"
alias localip="ipconfig getifaddr en1"
alias ips="ifconfig -a | grep -o 'inet6\? \(addr:\)\?\s\?\(\(\([0-9]\+\.\)\{3\}[0-9]\+\)\|[a-fA-F0-9:]\+\)' | awk '{ sub(/inet6? (addr:)? ?/, \"\"); print }'"
# Kill all the tabs in Chrome to free up memory
# [C] explained: http://www.commandlinefu.com/commands/view/402/exclude-grep-from-your-grepped-output-of-ps-alias-included-in-description
alias chromekill="ps ux | grep '[C]hrome Helper --type=renderer' | grep -v extension-process | tr -s ' ' | cut -d ' ' -f2 | xargs kill"
# Lock the screen (when going AFK)
alias afk="/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend"
# Reload the shell (i.e. invoke as a login shell)
alias reload="exec $SHELL -l"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment