-
Notifications
You must be signed in to change notification settings - Fork 0
/
.aliases
347 lines (336 loc) · 14 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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
# temporary fix for branch name not updating on prompt - for pure prompt
alias newsh='exec zsh'
alias svim='sudo vim -u NONE'
alias vim='nvim'
alias vimdiff='nvim -d'
# https://github.com/mhinz/neovim-remote
alias vimstart='NVIM_LISTEN_ADDRESS=/tmp/nvimsocket nvim'
alias vimr='nvr --remote'
# icloud drive
alias icl='$HOME/Library/Mobile\ Documents/com\~apple\~CloudDocs'
alias inbox='$HOME/Library/Mobile\ Documents/com\~apple\~CloudDocs/INBOX'
alias pers='$HOME/Library/Mobile\ Documents/com\~apple\~CloudDocs/PERSONAL'
alias notes='$HOME/Library/Mobile\ Documents/com\~apple\~CloudDocs/PERSONAL/my-notes'
alias dryrunmyfilestosati='rsync -av --delete --dry-run $HOME/My\ Files/ /Volumes/SATI/MY_FILES/'
alias dryrunmyfilestoseraph='rsync -av --delete --dry-run $HOME/My\ Files/ /Volumes/SERAPH/MY_FILES/'
alias rsyncmyfilestosati='rsync -av --delete $HOME/My\ Files/ /Volumes/SATI/MY_FILES/'
alias rsyncmyfilestoseraph='rsync -av --delete $HOME/My\ Files/ /Volumes/SERAPH/MY_FILES/'
alias rr=ranger
# https://github.com/bcicen/xiny
alias mdv=glow
alias conv=xiny
alias slackfu='slack-term -config $HOME/.slack-term-fu.json'
alias slackdark='npx install-dark-theme'
alias vlsub='vl -upgo'
alias cat=bat
alias kill=fkill
alias tree4='tree -L 4 -d'
alias tree3='tree -L 3 -d'
alias tree2='tree -L 2 -d'
alias tree1='tree -L 1 -d'
alias noder='node $HOME/.dotfiles/js/repl.js'
alias lol='archey && node -v | cowsay -f dragon-and-cow | lolcat'
alias fort='figlet node | lolcat && node -v | cowsay | lolcat && fortune | cowsay -f dragon-and-cow | lolcat'
alias cheats='mdv $HOME/.dotfiles/CHEAT.md'
alias vch='vim $HOME/.dotfiles/CHEAT.md'
alias cheatvim='mdv $HOME/.dotfiles/CHEAT_VIM.md'
alias cheatgit='mdv $HOME/.dotfiles/CHEAT_GIT.md'
alias cheatregex='mdv $HOME/.dotfiles/CHEAT_REGEX.md'
alias cheatdocker='mdv $HOME/.dotfiles/CHEAT_DOCKER.md'
alias cheatgogo='mdv $HOME/.gogodot/CHEAT_GOGO.md'
alias vcgo='vim $HOME/.gogodot/CHEAT_GOGO.md'
alias vso='vim $HOME/.gogodot/OmegaOptions.json'
alias vcv='vim $HOME/.dotfiles/CHEAT_VIM.md'
alias vcgit='vim $HOME/.dotfiles/CHEAT_GIT.md'
alias vcre='vim $HOME/.dotfiles/CHEAT_REGEX.md'
alias cheatoh='mdv $HOME/.dotfiles/CHEAT_OHMYZSH.md'
alias cheatg='cheatoh | rg git'
alias cheatpn='mdv $HOME/.dotfiles/CHEAT_PLUMNANO75.md'
alias cheatam='mdv $HOME/.dotfiles/CHEAT_AMETHYST.md'
alias cheatdocker='mdv $HOME/.dotfiles/CHEAT_DOCKER.md'
alias cheatfu='mdv $HOME/dev/csp/fu-cheats/README.md'
alias vcfu='vim $HOME/dev/csp/fu-cheats/README.md'
alias vpac='vim package.json'
alias vcl='vim CHANGELOG.*'
alias vpacc='vim package.json CHANGELOG.* package-lock.json'
alias figdata='figlet harmony data service && node -v | cowsay -f dragon-and-cow | lolcat'
alias figphone='figlet phone panel && node -v | cowsay -f dragon-and-cow | lolcat'
alias figlocal='figlet local dev && node -v | cowsay -f dragon-and-cow | lolcat'
alias figcontact='figlet manage contacts && node -v | cowsay -f dragon-and-cow | lolcat'
alias nodever='figlet node | lolcat && node -v | cowsay | lolcat'
alias nver='figlet node | lolcat && node -v | cowsay | lolcat'
alias nodestatus='which node && which npm && which npx && cat ~/.npmrc && ls /usr/local/lib/node_modules'
alias parcelnode='parcel --target=node'
alias pret='prettier'
alias wh='which'
alias hist10='fc -l -10'
alias hist20='fc -l -20'
alias xo='xdg-open'
alias xx='exit'
alias xxx='exit'
alias xxxx='exit'
alias dh='dirs -v'
# alias ls='ls -GpFh'
alias ll='ls -lGFh'
alias la='ls -aGFh'
alias lc='ls | wc -l'
alias lla='ls -laGFh'
alias lsa='ls -a | cat'
alias lsd='ls -d */'
alias lss='find -P . -maxdepth 1 -type l -exec echo -n "{} -> " \; -exec readlink {} \;'
alias delnode='find . -name node_modules -type d -print0|xargs -0 rm -r --'
alias rmnode="find . -name node_modules -type d -prune -exec rm -rf '{}' +"
alias neo='nvim'
alias nv='nvim'
alias v='vim'
alias vv='vim'
alias vi='vim'
alias Vim='vim'
alias vn='vim -u NONE'
alias vd='vim -d'
alias vims='vim -S'
alias vin='vim'
alias vf='vim `fzf`'
alias bim='vim'
alias vh='vim $HOME/.hyper.js'
alias vz='vim $HOME/.dotfiles/.zshrc'
alias vzh='vim $HOME/.dotfiles/.zshrc'
alias vrc='/usr/bin/vim $HOME/.vimfiles/vimconfig/vimrc'
alias vnc='nvim $HOME/.config/nvim/init.vim'
alias va='nvim $HOME/.config/alacritty/alacritty.yml'
alias vrg='nvim $HOME/.config/ranger/rc.conf'
alias vrgc='nvim $HOME/.config/ranger/commands.py'
alias vt='vim $HOME/.tmux.conf'
alias ta='tmux attach'
alias td='tmux detach'
alias tls='tmux ls'
alias tlsw='tmux list-windows'
alias tkill='tmux kill-session'
alias whatsmyip='ipconfig getifaddr en0'
alias cls='clear'
alias arc='archey && ipconfig getifaddr en0 && cat ~/.npmrc'
alias lara='php artisan serve --port=3000'
alias live='live-server -p 3000'
alias www='http-server -p 3000'
alias webs='http-server -p 3000'
# alias mgd='$HOME/bin/mgd.sh'
alias mgd='mongod --dbpath $HOME/data/mongodb'
# To have launchd start postgresql now and restart at login:
# brew services start postgresql
# Or, if you don't want/need a background service you can just run:
# pg_ctl -D /usr/local/var/postgres start
# OR just use Lunchy!
alias wttrwar='curl "wttr.in/warwick uk"'
alias wttrtile='curl "wttr.in/tile hill uk"'
alias pgstart='lunchy start postgres'
alias pgstop='lunchy stop postgres'
alias groot='cd $(git rev-parse --show-toplevel)'
alias vb='cd $HOME/.vimfiles/vimbundle'
alias vc='cd $HOME/.vimfiles/vimconfig'
alias vv='cd $HOME/.vimfiles/vimviews'
alias cdnc='cd $HOME/.config/nvim'
export GOGO_WIKI=$HOME/personal-wiki
alias gogowiki='cd $GOGO_WIKI'
export ICLOUD_WIKI=$HOME/Library/Mobile\ Documents/27N4MQEA55\~pro\~writer/Documents
alias cdwiki='cd $ICLOUD_WIKI'
alias dev='cd $HOME/dev'
alias gogo='cd $HOME/Documents/projects'
alias goloc='cd $HOME/Documents/projects/local-server'
alias ggs='cd $HOME/ggs'
alias cms='cd $HOME/Documents/projects/portalui/cms'
alias oa='cd $HOME/Documents/projects/portalapps/oauth'
alias por='cd $HOME/Documents/projects/portalui/portal'
alias ten='cd $HOME/Documents/projects/portalui/portal/apps/multi_tenant'
alias ual='cd $HOME/Documents/projects/portalui/portal/apps/ual'
alias vloc='goloc && vim webapps.json proxyservers.json'
alias goifc='cd $HOME/Documents/projects/local-server/ifc'
alias exphds='export APP_DATA_SERVICE_URL=http://localhost:3000/csp__harmony-data--service'
alias scrum='cd $HOME/Documents/gogo/gogo-art'
alias standup='nvim $HOME/Documents/gogo/gogo-art/README.md'
alias stup='cd $HOME/Documents/gogo/gogo-art && vim README.md TODO.txt NOTES.md LOGS.txt'
alias cppa='cd $HOME/dev/csp/csp__phone-panel--app'
alias chld='cd $HOME/dev/csp/harmony__local-development'
alias cmc='cd $HOME/dev/csp/csp__manage-contacts--app'
alias ccl='cd $HOME/dev/csp/csp__zendesk-cleanup--service'
alias cql='cd $HOME/dev/csp/csp__harmony-data--service'
alias c360='cd $HOME/dev/csp/fu360'
alias czat='cd $HOME/dev/csp/zendesk-app-template'
alias oss='cd $HOME/dev/oss'
alias blog='cd $HOME/dev/flipjs.io'
alias ng='cd $HOME/dev/angular'
alias bb='cd $HOME/dev/backbone'
alias js='cd $HOME/dev/javascript'
alias typ='cd $HOME/dev/typescript'
alias cof='cd $HOME/dev/coffee'
alias me='cd $HOME/dev/mean'
alias dot='cd $HOME/.dotfiles'
alias gog='cd $HOME/.gogodot'
alias proj='cd $HOME/Documents/projects'
alias tmp='cd $HOME/dev/temp'
alias temp='cd $HOME/dev/temp'
alias kb='cd $HOME/dev/keyboard'
alias es='cd $HOME/dev/es6'
alias phoe='cd $HOME/dev/phoenix'
alias elix='cd $HOME/dev/elixir'
alias elmm='cd $HOME/dev/elm'
alias hsk='cd $HOME/dev/haskell'
alias rea='cd $HOME/dev/react'
alias vue='cd $HOME/dev/vue'
alias red='cd $HOME/dev/redux'
alias rb='cd $HOME/dev/ruby'
alias py='cd $HOME/dev/python'
alias ph='cd $HOME/dev/php'
alias dj='cd $HOME/dev/django'
alias aacc='cd $HOME/dev/projects/aacc'
alias stp="open '$HOME/Library/Application Support/Sublime Text 3/Packages'"
alias kar="cd '$HOME/.config/karabiner'"
alias mir='cd $HOME/dev/mechanicalkeyboards/qmk_firmware_miryoku'
alias zmk='cd $HOME/dev/mechanicalkeyboards/zmk-config'
alias spec="cd '$HOME/Library/Application Support/Spectacle'"
alias db="cd '$HOME/Dropbox'"
alias zrel=". $HOME/.zshrc"
alias top="vtop -t wizard"
alias nodedev='tmuxinator start dev'
alias legacy='tmuxinator start devlegacy'
alias legacyfix='nvm use $NODE_OLD_VERSION && figlet neo | lolcat && node -v | cowsay -f dragon-and-cow | lolcat'
alias nodeold='nvm use $NODE_OLD_VERSION && node -v'
alias portal='tmuxinator start devportal'
alias portalfix='nvm use $NODE_LATEST_VERSION && figlet neo | lolcat && node -v | cowsay -f dragon-and-cow | lolcat'
alias nodelatest='nvm use $NODE_LATEST_VERSION && node -v'
alias ttkill='tmux kill-session -t matrix'
alias msh='tmuxinator start shell'
alias mfh='tmuxinator start harmony'
alias mfc='tmuxinator start csp'
alias mfppa='tmuxinator start ppa'
alias mfhld='tmuxinator start hld'
alias mfmc='tmuxinator start contacts'
alias mfcl='tmuxinator start cleanup'
alias mfql='tmuxinator start ql'
alias mf360='tmuxinator start 360'
alias mfm='tmuxinator start mac'
alias mnt84='sudo sshfs -o allow_other root@10.10.10.84:/ $HOME/mount/84'
alias mnt242='sudo sshfs -o allow_other root@10.10.10.242:/ $HOME/mount/242'
alias umnt84='sudo umount $HOME/mount/84'
alias umnt242='sudo umount $HOME/mount/242'
alias cdmnt84='cd $HOME/mount/84'
alias cdmnt242='cd $HOME/mount/242'
alias cdmnt84zg='cd $HOME/mount/84/var/www/html/zgtin'
alias cdmnt242i3='cd $HOME/mount/242/root/I3'
alias nrb='npm run build'
alias nrc='npm run clean'
alias nry='npm run deploy'
alias nrp='npm run deploy:prod'
alias nrd='npm run dev'
alias nrl='npm run lint'
alias nrld='npm run lint:dev'
alias nrt='npm run test'
alias nrtp='npm run test::print'
alias nrtw='npm run test::watch'
alias wnrt='nodemon --exec "npm run test"'
alias nrtu='npm run test::unit'
alias nrtuw='npm run test::unit::watch'
alias wnrtu='nodemon --exec "npm run test::unit"'
alias nrti='npm run test::integration'
alias nrtiw='npm run test::integration::watch'
alias nrtf='npm run test::functional'
alias wnrti='nodemon --exec "npm run test::integration"'
alias nrtd='npm run test:dev'
alias wnrtd='nodemon --exec "npm run test::dev"'
alias nrs='npm start'
alias yrs='yarn start'
alias nrw='npm run watch'
alias nrsd='npm run start::dev'
alias nrsds='npm run start::devserver'
alias nrssd='npm run start::server::dev'
alias nrqa='npm run qa'
alias nrqal='npm run qa::lint'
alias nrqalf='npm run qa::lint::fix'
alias nrqalp='npm run qa::lint::print'
alias nrqaw='npm run qa::watch'
alias nrqalw='npm run qa::lint::watch'
alias nrwa='npm run watch::amd'
alias cras='NODE_PATH=./src npm start'
alias crab='NODE_PATH=./src npm run build'
alias crat='NODE_PATH=./src npm run test'
alias esl='eslint . ./'
alias win2unix="find . -type f | xargs perl -pi -e 's/\r\n|\n|\r/\n/g'"
alias loc='find . -name "*" | xargs wc -l'
alias nets='sudo netstat -ap'
alias dcc='docker-compose'
alias dps='docker ps'
alias dpss='docker ps | less -S'
alias dimg='docker images'
alias dsa='docker stop $(docker ps -a -q)'
alias dac='docker rm $(docker ps -a -q)'
alias dai='docker rmi $(docker images -q)'
alias dcls='docker container ls -a'
alias dclss='docker container ls -a | less -S'
alias dils='docker image ls'
alias dilss='docker image ls | less -S'
alias dspf='docker system prune -f'
alias dspa='docker system prune -a'
# override gs (ghostscript) an run gst instead
alias gfp='git fetch -p'
alias gs='git show'
alias gcdd='git checkout dev'
alias gstau='git stash push -u'
alias gstall='echo "Dont use git stash --all - will stash node_modules!"'
# due to muscle memory, show reminder to use different command
alias gl='echo "Dont use git pull, use git fetch and then git merge."'
alias glog="git log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
alias glogb="git log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --branches"
alias gitmergemaster='gcm && git fetch upstream && git merge upstream/master && gp'
alias gsd='git status -s | while read mode file; do echo $mode $(stat -f "%m" $file) $file; done|sort'
alias ic='cd $HOME/Library/Mobile\ Documents/com~apple~CloudDocs'
alias ff='fd'
alias mutt='neomutt'
alias todo='todoist'
alias seraph="diskutil mount `diskutil list | grep "SERAPH" | sed -n -e 's/^.* //p'`"
alias sati="diskutil mount `diskutil list | grep "SATI" | sed -n -e 's/^.* //p'`"
alias bane="diskutil mount `diskutil list | grep "BANE" | sed -n -e 's/^.* //p'`"
# wifi/power
alias wof='networksetup -setairportpower en0 off'
alias won='networksetup -setairportpower en0 on'
alias pow='pmset -g ps'
# list usb devices
alias usbdev="ioreg -p IOUSB -w0 | sed 's/[^o]*o //; s/@.*$//' | grep -v '^Root.*'"
# TODO: put aliases below in relevant locations
alias compgif='gifsicle --batch -V -O2'
alias compjpg='jpegoptim -m80'
alias comppng='optipng -o7'
alias en0='ipconfig getifaddr en0'
alias en1='ipconfig getifaddr en1'
alias ga='git add'
alias gc='git commit -v'
alias gcd='git checkout develop'
alias gcm='git checkout master'
alias gcmod='git diff-tree --no-commit-id --name-only -r'
alias gco='git checkout'
alias gd='git diff'
alias gdfix='git diff --name-only | uniq | xargs nvim'
alias gdn='git --no-pager diff'
alias gdtl='git difftool'
alias gls='git ls-files --others --exclude-standard'
alias gmodvim='nvim $(git ls-files --modified)'
alias gnewvim='nvim $(git ls-files -o --exclude-standard)'
alias gp='git push'
alias gst='git status'
alias gfomm='git fetch origin master:master'
alias ls=exa
alias opin='eval $(op signin my)'
alias pingg=prettyping
alias plugged='cd $HOME/.local/share/nvim/plugged'
alias salias='source $HOME/.dotfiles/.aliases'
alias son='sonos --zone=RINCON_48A6B88CEB8601400:858641578'
alias sonv='sonos --zone=RINCON_48A6B88CEB8601400:858641578 volume'
alias valias='vim $HOME/.dotfiles/.aliases'
alias rgi='rg -i'
alias rgl='rg -l'
alias rgli='rg -li'
alias n='nvm use $1'
alias n='nvm use $1'
# alias jsondiff='diff <(jq --sort-keys . $1) <(jq --sort-keys . $2)'
alias sambuild='nvm use 10; sam build; nvm use 16'
alias samlocal='sam local invoke CmsFunction --event events/eventPromote.json'
alias sammy='sambuild && samlocal'
# alias sammy='nvm use 10; sam build; nvm use 16; sam local invoke CmsFunction --event events/eventPromote.json'