Created
January 14, 2014 14:18
-
-
Save marcjenkins/8418971 to your computer and use it in GitHub Desktop.
My .bash_profile cobbled together from numerous sources.
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
# Easier navigation | |
alias ..="cd .." | |
alias ...="cd ../.." | |
alias ....="cd ../../.." | |
# Shortcuts | |
alias brewup='brew update && brew upgrade && brew cleanup && brew doctor' | |
alias ping='ping -c 1' | |
alias ls='ls -lA' | |
alias d='cd ~/Dropbox' | |
alias dl='cd ~/Downloads' | |
alias dt='cd ~/Desktop' | |
alias cds='cd ~/Sites/' | |
alias ffs="sudo !!" | |
# Git | |
alias gs='git status' | |
alias gc='git commit -m' | |
alias gco='git checkout' | |
alias gl='git pull' | |
alias gpom="git pull origin master" | |
alias gp='git push' | |
alias gb='git branch' | |
alias gba='git branch -a' | |
alias del='git branch -d' | |
# Sublime | |
export EDITOR='subl -w' | |
alias s="subl ." | |
alias e='subl . &' | |
# Local server related | |
alias flushcache='dscacheutil -flushcache' | |
alias apacherestart='sudo apachectl graceful' | |
alias apachevhosts='sudo subl /etc/apache2/users/marcjenkins.conf' | |
alias apachehosts='sudo subl /etc/hosts' | |
alias phpini='sudo subl /etc/php.ini' | |
# IP addresses | |
alias ip="dig +short myip.opendns.com @resolver1.opendns.com" | |
alias localip="ipconfig getifaddr en1"± | |
alias ips="ifconfig -a | grep -o 'inet6\? \(\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\)\|[a-fA-F0-9:]\+\)' | sed -e 's/inet6* //'" | |
# Enhanced WHOIS lookups | |
alias whois="whois -h whois-servers.net" | |
# View HTTP traffic | |
alias sniff="sudo ngrep -d 'en1' -t '^(GET|POST) ' 'tcp and port 80'" | |
alias httpdump="sudo tcpdump -i en1 -n -s 0 -w - | grep -a -o -E \"Host\: .*|GET \/.*\"" | |
# Show/hide hidden files in Finder | |
alias show="defaults write com.apple.finder AppleShowAllFiles -bool true && killall Finder" | |
alias hide="defaults write com.apple.finder AppleShowAllFiles -bool false && killall Finder" | |
# Hide/show all desktop icons (useful when presenting) | |
alias hidedesktop="defaults write com.apple.finder CreateDesktop -bool false && killall Finder" | |
alias showdesktop="defaults write com.apple.finder CreateDesktop -bool true && killall Finder" | |
# Misc | |
alias stfu="osascript -e 'set volume output muted true'" | |
alias pumpitup="osascript -e 'set volume 7'" | |
alias hax="growlnotify -a 'Activity Monitor' 'System error' -m 'WTF R U DOIN'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment