-
Notifications
You must be signed in to change notification settings - Fork 0
/
aliases
34 lines (25 loc) · 1.21 KB
/
aliases
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# vim: set filetype=sh :
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."
# Enable aliases to be sudo’ed
alias sudo='sudo '
alias serve='python3 -m http.server'
# Remove any and all target directories from the descendents of this directory
# to ensure that everything works when re-built
# Needed when Maven / Gradle / SBT does foolish things (see http://stackoverflow.com/q/4483230/135978)
alias cleanjvmbuild='find . -name target -type d -exec rm -rf {} \;'
# Some useful voice shortcuts for OS X
alias robotic="say -v Trinoids"
alias cultivated="say -v Daniel"
alias lilt="say -v Fiona"
# Unreleased ECMAScript features
alias node-preview='node --use-strict $(node --v8-options | grep harm | awk '"'"'{print $1}'"'"' | xargs)'
alias external_ip='dig +short myip.opendns.com @resolver1.opendns.com'
alias local_ip='ipconfig getifaddr en0'
alias human-size="gnumfmt --from=auto --to=iec-i --format='%.2f'"
alias human-num="gnumfmt --from=auto --format=%\\'.2f"
# Run ImageOptim from the command line (no flags allowed, only positional image args)
alias image-optim="/Applications/ImageOptim.app/Contents/MacOS/ImageOptim"
alias trim-whitespace="gsed 's/^[[:blank:]]*//;s/[[:blank:]]*$//'"