Created
September 11, 2014 22:01
-
-
Save BukhariH/55a286ea28b36361e1db to your computer and use it in GitHub Desktop.
.dotfile
This file contains hidden or 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
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