-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.aliases
159 lines (125 loc) · 3.81 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
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
##
## ~/.aliases
# up one
alias ..='cd ..'
# type dot-dot-dot, do nothing
alias ...=''
alias shrug='echo -n "¯\_(ツ)_/¯" | pbcopy'
# quick auths
alias sup='sudo -i'
# go to the desktop.
alias dt='cd ~/Desktop'
# add colours, please.
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
# the os x version of ls doesn't support the --color switch; use -G.
# thinking of using ls from GNU coreutils.
alias ls='ls -G'
# simple aliases
alias ll='ls -l'
alias lla='ls -la'
# python debugger.
alias p='DEBUG=yes python -m pdb '
# a little piece of the history
alias h='history | tail -n 32'
# shell - mac os x specific obv.
alias shell='/Applications/Utilities/Terminal.app/Contents/MacOS/Terminal > /dev/null 2>&1 &'
# py.test
alias pt='py.test -n 4'
# git
alias g='git'
alias status='git status'
alias add='git add .'
alias commit='git commit'
alias branch='git branch'
alias checkout='git checkout'
alias push='git push origin master'
alias fetch='git fetch --all'
# more.
alias undo='echo "UNDOING COMMIT."; git reset --soft HEAD^'
alias lastdiff='git diff HEAD^ HEAD'
alias commit_all='echo "COMMITING."; git commit -a'
# shorties.
alias a='git add'
alias b='git branch'
alias co=checkout
alias s=status
alias l='git log --stat --abbrev-commit --show-signature'
alias d='git diff'
alias dd='git diff --cached'
alias ddd=lastdiff
alias c=commit
alias cc=commit_all
# two 'git log' variants, defined in ~/.gitconfig
alias t='git lg'
alias ta='git lg --all'
alias tt='git tree'
# quickies.
alias gpd='git push origin develop'
alias gpm='git push origin master'
# 1) write test.
# 2) pass test.
# 3) refactor.
# .)
# 5) commit
# ec2
alias edi=ec2-describe-instances
alias eri=ec2-run-instances
alias edv=ec2-describe-volumes
alias eatv=ec2-attach-volume
alias edtv=ec2-detach-volume
# hadoop-ec2
alias che=hadoop-ec2
alias chel='hadoop-ec2 launch-cluster'
alias chet='hadoop-ec2 terminate-cluster'
alias ches='hadoop-ec2 list'
# moving data much?
alias sync-torrents='rsync -avu ~/torrent-files/*.torrent mosfet:~/.torrent-watch --ignore-existing'
alias suck-back-mosfet='rsync --archive --verbose --update -r mosfet:~/torrent/* --ignore-existing --progress /Volumes/data/incoming/sync-mosfet'
# hadoop & hbase & zohmg
alias dfs="hadoop dfs"
alias activate-zohmg='source ~/workspace/python-environs/zohmg/bin/activate'
# productivity.
alias to-pda='cd ~/Desktop/pda'
alias pda-update='pushd ~/Desktop/pda; git commit . -m "pda: updated"; popd'
# transformations.
alias html='markable | markdown'
alias markable='cat'
alias check_html='open http://validator.w3.org/#validate_by_input+with_options'
# loading the virtuelenv wrappers is really slow!
# instead of loading on each new shell invocation,
# whenever I need them I go 'loadvirtualenvwrappers'.
alias loadvirtualenvwrappers='source /usr/local/Cellar/python/2.7/bin/virtualenvwrapper.sh'
# watch *.py and execute main.py on any change.
# (uses `watchmedo` from the watchdog package)
alias watchmain='watchmedo shell-command -w -R -p "*.py" -c "python main.py"'
# django
alias pm='python manage.py'
# gpg
alias gp='gpg2'
alias gpg='gpg2'
# generate a strong random password
alias password='head -c 128 /dev/random | shasum | cut -c -40'
# list with colour (-F) and symbols that indicate type (-G),
# without group name (-o).
alias ls='ls -oFG'
# silent curl
alias curl='curl -s'
# rails console on flo
alias floc="ssh -t flo 'sudo -u deploy bash -c \"cd /srv/www/web/current && RAILS_ENV=production bin/rails c\"'"
# bundle exec
alias be='time bundle exec'
# project shortcuts
alias hw='cd ~/hack/web'
alias hg='cd ~/hack/gifstash'
# rspec for feature specs
alias fspec='time be rspec -t type:feature'
# docker
alias dinit='eval `boot2docker shellinit`'
## playground
# git
alias gs='git show'
alias gss='git show --stat'
# rake and rails
alias rt='be rake test -v'