Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 99 lines (77 sloc) 2.96 KB
# GENERAL BASH Shortcuts
alias l='ls -G'
alias ll='ls -FlahG' # l for list style, a for all including hidden, h for human readable file sizes
alias h='history' # shortcut for history
alias ..='cd ..' # move up 1 dir
alias ...='cd ../..' # move up 2 dirs
alias c='clear'
# List only directories
alias lsd='ls -l | grep "^d"'
# IP addresses
alias ip="dig +short"
alias localip="ipconfig getifaddr en1"
alias ips="ifconfig -a | perl -nle'/(\d+\.\d+\.\d+\.\d+)/ && print $1'"
# Flush Directory Service cache
alias flush="dscacheutil -flushcache"
# 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 \/.*\""
# File size
alias fs="stat -f \"%z bytes\""
# ROT13-encode text. Works for decoding, too! ;)
alias rot13='tr a-zA-Z n-za-mN-ZA-M'
alias tty='ls /dev/tty.*'
alias s9600='screen /dev/tty.PL2303-000012FD 9600'
# Don't put duplicate lines in the history.
export HISTCONTROL=ignoreboth
# fun with rainbows...
alias lulz='cat /dev/urandom | base64 -b 80 | lolcat'
# Colorize Grep
alias grep='GREP_COLOR="1;37;41" LANG=C grep --color=auto'
# Shortcuts
alias d="cd ~/Documents/Dropbox"
alias p="cd ~/Projects"
alias g="git"
alias v="vim"
# Show/hide hidden files in Finder
alias show="defaults write AppleShowAllFiles -bool true && killall Finder"
alias hide="defaults write AppleShowAllFiles -bool false && killall Finder"
# Hide/show all desktop icons (useful when presenting)
alias hidedesktop="defaults write CreateDesktop -bool false && killall Finder"
alias showdesktop="defaults write CreateDesktop -bool true && killall Finder"
# Disable Spotlight
alias spotoff="sudo mdutil -a -i off"
# Enable Spotlight
alias spoton="sudo mdutil -a -i on"
# Create a logfile out to $HOME/Logs
alias log="$HOME/.bashscripts/"
# Make a DMG into an ISO (#dmg2iso fileOne.dmg newFile.iso)
alias dmg2iso="$HOME/.bashscripts/"
# Stuff I never really use but cannot delete either because of
alias stfu="osascript -e 'set volume output muted true'"
alias pumpitup="osascript -e 'set volume 10'"
alias hax="growlnotify -a 'Activity Monitor' 'System error' -m 'WTF R U DOIN'"
# Ostianto
alias ost="sudo /Applications/"
# GIT Shortcuts (
alias ga='git add'
alias gp='git push'
alias gl='git log'
alias gs='git status'
alias gd='git diff'
alias gm='git commit -m'
alias gma='git commit -am'
alias gb='git branch'
alias gc='git checkout'
alias gra='git remote add'
alias grr='git remote rm'
alias gpu='git pull'
alias gcl='git clone'
# SVN Shortcut to remove all dead files
#alias svndead='svn status | sed -Ee '/^!/!d' -e 's/^! *(.*)/"\1"/g' | xargs -L1 svn rm'