aboutsummaryrefslogtreecommitdiffstats
path: root/.aliases
diff options
context:
space:
mode:
authorMathias Bynens <mathias@qiwi.be>2011-09-05 20:08:58 +0200
committerMathias Bynens <mathias@qiwi.be>2011-09-05 20:08:58 +0200
commit7d022705ed126d78881fb7356e28f64ee7e540f4 (patch)
tree4380e9d825f2364b42e4c145f1db3d9e29f463d0 /.aliases
downloaddotfiles-7d022705ed126d78881fb7356e28f64ee7e540f4.tar.gz
dotfiles-7d022705ed126d78881fb7356e28f64ee7e540f4.tar.bz2
dotfiles-7d022705ed126d78881fb7356e28f64ee7e540f4.zip
Initial commit.
Diffstat (limited to '.aliases')
-rw-r--r--.aliases52
1 files changed, 52 insertions, 0 deletions
diff --git a/.aliases b/.aliases
new file mode 100644
index 0000000..abc6d91
--- /dev/null
+++ b/.aliases
@@ -0,0 +1,52 @@
+# Easier navigation: .., ..., ~ and -
+alias ..="cd .."
+alias ...="cd ../.."
+alias ~="cd ~" # `cd` is probably faster to type though
+alias -- -="cd -"
+
+# List all files colorized in long format, including dot files
+alias la="ls -Gla"
+
+# IP addresses
+alias ip="dig +short myip.opendns.com @resolver1.opendns.com"
+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 \/.*\""
+
+# Start an HTTP server from a directory
+alias server="open http://localhost:8080/ && python -m SimpleHTTPServer 8080"
+
+# Trim new lines and copy to clipboard
+alias c="tr -d '\n' | pbcopy"
+
+# Shortcuts
+alias d="cd ~/Documents/Dropbox"
+alias p="cd ~/Projects"
+alias g="git"
+alias v="vim"
+alias m="mate ."
+
+# 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'
+
+# Disable Spotlight
+alias spotoff="sudo mdutil -a -i off"
+# Enable Spotlight
+alias spoton="sudo mdutil -a -i on"
+
+# One of @janmoesen’s ProTip™s
+for method in GET POST HEAD PUT DELETE; do alias "$method"="lwp-request -m '$method'"; done
+
+# Stuff I never really use but cannot delete either because of http://xkcd.com/530/
+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'" \ No newline at end of file