-
Notifications
You must be signed in to change notification settings - Fork 0
/
.alias
66 lines (49 loc) · 1.94 KB
/
.alias
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Google meetings
alias e='emacs'
alias mount='diskutil mount'
alias umount='diskutil unmount'
alias g="git"
alias h="history"
alias j="jobs"
alias aj="autojump"
# Make some possibly destructive commands more interactive.
alias rm='rm -i'
alias mv='mv -i'
alias cp='cp -i'
# Add some easy shortcuts for formatted directory listings and add a touch of color.
alias ll='ls -lF'
alias la='ls -alF'
alias ls='ls -F'
# Make grep more user friendly by highlighting matches
# and exclude grepping through .svn folders.
alias grep='grep --color=auto --exclude-dir=\.svn'
# SVN helpers
alias snv='svn'
alias sr='svn revert'
alias ss='svn status | more'
alias si='svn info'
alias sd='svn diff'
alias sc='svn commit'
alias sup='svn up'
# Clear term
alias c='clear'
alias cls='clear'
# docker
alias vnc_chrome='open vnc://:secret@localhost:$(docker ps | grep chrome | grep -oE "0.0.0.0:\d+" | cut -d: -f2)'
alias vnc_firefox='open vnc://:secret@localhost:$(docker ps | grep firefox | grep -oE "0.0.0.0:\d+" | cut -d: -f2)'
# Get week number
alias week='date +%V'
# Stopwatch
alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date'
# macOS has no `md5sum`, so use `md5` as a fallback
command -v md5sum > /dev/null || alias md5sum="md5"
# macOS has no `sha1sum`, so use `shasum` as a fallback
command -v sha1sum > /dev/null || alias sha1sum="shasum"
# 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 output volume 100'"
# 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"
# Print each PATH entry on a separate line
alias path='echo -e ${PATH//:/\\n}'