-
Notifications
You must be signed in to change notification settings - Fork 64
/
.aliases
307 lines (288 loc) · 9.53 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
# unix
alias c='cat'
alias le='less -j4'
alias chex='chmod +x'
alias cpr='cp -r'
alias rr='rm -Rf'
alias mn='mv -vn'
alias txf='tar -xf'
alias ttf='tar -tf'
alias v='vim'
alias v.='vim .'
ialias vi='vim'
alias uz='unzip'
alias uzl='unzip -l'
ialias tree='tree -a -I ".svn|.git|.hg|.idea"'
ialias ls='ls --color=tty'
ialias diff='diff --color'
alias tree2='tree -L 2'
alias tree3='tree -L 3'
alias grepr='grep -r'
alias grepi='grep -i'
alias grepri='grep -ri'
alias fn='find . -name "*'
alias ff='find . -name "*.'
alias h='hash -rf'
alias sz='source ~/.zshrc'
alias hx='hexdump -C'
alias k9='kill -9'
alias k15='kill -15'
alias w1='watch -n 1'
alias rp='realpath'
alias CC='$(fc -l -n -1) | clipcopy'
alias pwdc='pwd | clipcopy'
alias psj='ps aux | grep "[j]ava"'
# desktop
alias xauto='xrandr --auto'
# executables
alias cs='create-script'
alias ij='start-intellij'
balias se='session-'
alias acd='asciidoctor'
alias ti='timer'
alias tmzs='timezones'
alias dea='direnv allow'
alias dee='direnv edit'
ialias curl='curl --silent --show-error'
balias clh='curl localhost:'
balias clh8='curl localhost:8080'
balias clh9='curl localhost:9080'
balias c100='curl 192.168.99.100:'
ialias cal='cal -y --monday'
# network
alias wi='sudo wifi-menu'
alias p1='ping 1.1.1.1'
alias p192='ping 192.168.1.1'
alias p8='ping 8.8.8.8'
alias p9='ping 9.9.9.9'
# system
alias tmz='sudo timedatectl set-timezone'
# mvn
alias mvv='mvn -v'
alias mci='mvn clean install'
alias mciT='mvn clean install -DskipTests'
alias mciTT='mvn clean install -Dmaven.test.skip'
alias mcd='mvn clean deploy'
alias mcdT='mvn clean deploy -DskipTests'
alias mcdTT='mvn clean deploy -Dmaven.test.skip'
alias mp='mvn package'
alias mpT='mvn package -DskipTests'
alias mpTT='mvn package -Dmaven.test.skip'
alias mve='mvn verify'
alias mcv='mvn clean verify'
alias mcve='mvn clean verify'
alias mpld='mvn package liberty:dev'
alias mpldT='mvn package liberty:dev -DhotTests'
alias mcpld='mvn clean package liberty:dev'
alias mcpldT='mvn clean package liberty:dev -DhotTests'
alias mld='mvn liberty:dev'
alias mldT='mvn liberty:dev -DhotTests'
alias mcp='mvn clean package'
alias mcpT='mvn clean package -DskipTests'
alias mcpTT='mvn clean package -Dmaven.test.skip'
alias mqd='mvn compile quarkus:dev'
alias mcqd='mvn compile quarkus:dev'
alias mccqd='mvn clean compile quarkus:dev'
alias mit='mvn test-compile failsafe:integration-test failsafe:verify'
alias mc='mvn clean'
alias mct='mvn clean test'
alias mgs='mvn generate-sources'
alias mrr='mvn release:prepare release:perform -DperformRelease=true -DignoreSnapshots=false'
alias mgat='mvn io.gatling:gatling-maven-plugin:execute'
# git
alias gs='git show'
alias gt='git tag'
alias gupd='git update'
alias ggpusht='git push origin $(git_current_branch) --tags'
alias ggpushf='git push origin $(git_current_branch) --force'
alias ggpushtf='git push origin $(git_current_branch) --tags --force'
alias ggpushft='git push origin $(git_current_branch) --tags --force'
alias ggpull='git pull --rebase origin $(git_current_branch)'
alias ggpp='git pull --rebase origin $(git_current_branch) && git push origin $(git_current_branch)'
alias grbum='git rebase upstream/master'
alias gcob='git checkout -b'
alias gcmsg='git commit -m'
alias gg='git graph'
alias gsts='git stash save'
alias grget='git remote get-url origin'
alias gpr='hub pull-request -b $(git_main_branch)'
alias gci='hub issue create'
alias hcl='hub clone'
# svn
alias svu='svn update'
alias svs='svn status'
alias svi='svn info'
# docker
alias dk='docker'
alias dkp='docker ps'
alias dkpa='docker ps -a'
alias dkpaq='docker ps -a -q'
alias dkb='docker build -t'
alias dkbnc='docker build --no-cache -t'
alias dkr='docker run --rm'
alias dkrti='docker run --rm -ti'
alias dkrd='docker run -d'
alias dkrp8='docker run --rm -p 8080:8080'
alias dkrp9='docker run --rm -p 9080:9080'
alias dks='docker start'
alias dkt='docker stop'
alias dktt='docker stop $(docker ps -q)'
alias dkk='docker kill'
alias dkkk='docker kill $(docker ps -q)'
alias dkrm='docker rm'
alias dkri='docker rmi'
alias dke='docker exec -ti'
alias dkl='docker logs -f'
alias dki='docker images'
alias dkpu='docker pull'
alias dkph='docker push'
alias dkin='docker inspect'
alias dkn='docker network'
alias dkc='docker-compose'
alias dkcu='docker-compose up'
alias dkclean='docker ps -q -a -f status=exited | xargs -r docker rm && docker images -q -f dangling=true | xargs -r docker rmi'
# kubernetes
alias kc='kubectl'
alias kcg='kubectl get'
alias kcgn='kubectl get --namespace'
alias kcd='kubectl describe'
alias kcdn='kubectl describe --namespace'
alias kcdl='kubectl delete'
alias kcdln='kubectl delete --namespace'
alias kcdlp='kubectl-delete-pod'
alias kcgno='kubectl get nodes'
alias kcgp='kubectl get pods'
alias wkcgp='w1 kubectl get pods'
alias kcgpn='kubectl get pods --namespace'
alias kcgpp='kubectl get pods --all-namespaces'
alias kcgd='kubectl get deployments'
alias kcgdn='kubectl get deployments --namespace'
alias kcgdd='kubectl get deployments --all-namespaces'
alias kcgs='kubectl get services'
alias kcgsn='kubectl get services --namespace'
alias kcgss='kubectl get services --all-namespaces'
alias kcgi='kubectl get ingresses'
alias kcgin='kubectl get ingresses --namespace'
alias kcgii='kubectl get ingresses --all-namespaces'
alias kcgc='kubectl get configmaps'
alias kcgcn='kubectl get configmaps --namespace'
alias kcgcc='kubectl get configmaps --all-namespaces'
alias kcgv='kubectl get virtualservices'
alias kcgvn='kubectl get virtualservices --namespace'
alias kcgvv='kubectl get virtualservices --all-namespaces'
alias kcgdr='kubectl get destinationrules'
alias kcgdrn='kubectl get destinationrules --namespace'
alias kcgdrr='kubectl get destinationrules --all-namespaces'
alias kcgg='kubectl get gateways'
alias kcggn='kubectl get gateways --namespace'
alias kcggg='kubectl get gateways --all-namespaces'
alias kcgse='kubectl get serviceentries'
alias kcgsen='kubectl get serviceentries --namespace'
alias kcgsee='kubectl get serviceentries --all-namespaces'
alias kcgr='kubectl get routerules'
alias kcgrn='kubectl get routerules --namespace'
alias kcgrr='kubectl get routerules --all-namespaces'
alias kcgdp='kubectl get destinationpolicies'
alias kcgdpn='kubectl get destinationpolicies --namespace'
alias kcgdpp='kubectl get destinationpolicies --all-namespaces'
alias kcge='kubectl get events --sort-by=".lastTimestamp" --all-namespaces --watch'
alias kcc='kubectl create'
alias kccn='kubectl create --namespace'
alias kca='kubectl apply -f'
alias kcan='kubectl apply -f --namespace'
alias kce='kubectl exec -t -i'
alias kcen='kubectl exec -t -i --namespace'
alias kcl='kubectl logs -f'
alias kcll='kubectl-logs'
alias kcln='kubectl logs -f --namespace'
alias kcgx='kubectl config get-contexts'
alias kcux='kubectl config use-context'
alias kcxsn='kubectl config set-context $(kubectl config current-context) --namespace'
alias kcpf='kubectl port-forward'
alias kcpfn='kubectl port-forward --namespace'
alias kcpfg='kubectl-port-forward-grafana'
alias kcpfj='kubectl-port-forward-jaeger'
alias kcpfk='kubectl-port-forward-kiali'
alias kcpfp='kubectl-port-forward-prometheus'
alias kcpfpf='kubectl-port-forward-prometheus-federation'
alias kcpfz='kubectl-port-forward-zipkin'
alias kcdldr='kubectl-delete-default-resources'
alias kcii='kubectl-ingress-ip-address'
alias kcni='kubectl-nginx-ip-address'
alias kcigip='kubectl-istio-gateway-ip-address'
alias kcignp='kubectl-istio-gateway-http-nodeport'
# minikube
alias mks='minikube start'
alias mkt='minikube stop'
# global (to be chained with _ -> sudo, or expanded anywhere)
# unix
alias -g md='mkdir -p'
alias -g wh='which'
alias -g wt='while true; do'
alias -g s1='sleep 1'
alias -g s2='sleep 2'
alias -g s01='sleep 0.1'
alias -g s05='sleep 0.5'
ialias -g grep='grep --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn}'
alias -g A1="| awk '{print \$1}'"
alias -g L='| less'
alias -g H='| head'
alias -g H2='| head -n 20'
alias -g G='| grep'
alias -g Gi='| grep -i'
alias -g GH='| grep HTTP'
alias -g X='| xargs -I@'
alias -g C='| clipcopy'
alias -g Fj='| jq .'
alias -g Fy='| yq .'
alias -g Fx='| xmllint --format -'
alias -g V='| vim -'
# executables
ialias -g l='exa -al'
ialias -g cat='bat --plain --wrap character'
# arguments
alias -g cpjson="-XPOST -H 'Content-Type: application/json' -d '{}'"
alias -g cptext="-XPOST -H 'Content-Type: text/plain' -d"
alias -g On="--output name"
alias -g Oj="--output json"
alias -g Oy="--output yaml"
alias -g Ow="--output wide"
alias -g Ot="--template"
# pacman
alias -g pcy='pacman -Syu'
alias -g pcs='pacman -S'
alias -g pcss='pacman -Ss'
alias -g pcqs='pacman -Qs'
alias -g pcr='pacman -R'
alias -g pcrs='pacman -Rs'
alias -g pcclean='pacman -Rsn $(pacman -Qqdt)'
alias -g pry='pacaur -Syu'
alias -g prs='pacaur -S'
alias -g prss='pacaur -Ss'
# systemctl
alias -g scl='systemctl'
alias -g sclss='systemctl status'
alias -g scle='systemctl enable'
alias -g scld='systemctl disable'
alias -g sclr='systemctl restart'
alias -g scls='systemctl start'
alias -g sclt='systemctl stop'
alias -g scldr='systemctl daemon-reload'
alias -g jou='sudo journalctl -b -n 200 -f'
# java
alias -g j='java'
alias -g jc='javac'
alias -g jj='java -jar'
alias -g jv='java -version'
alias -g jcv='javac -version'
alias -g jp='javap -v -l -p -c -s'
# suffix
alias -s {pdf,PDF}='background mupdf'
alias -s {jpg,JPG,png,PNG}='background gpicview'
alias -s {ods,ODS,odt,ODT,odp,ODP,doc,DOC,docx,DOCX,xls,XLS,xlsx,XLSX,xlsm,XLSM,ppt,PPT,pptx,PPTX,csv,CSV}='background libreoffice'
alias -s {html,HTML}='background chromium'
alias -s {mp4,MP4,mov,MOV,mkv,MKV}='background vlc'
alias -s {zip,ZIP,war,WAR}="unzip -l"
alias -s {jar,JAR}="java -jar"
alias -s gz="tar -tf"
alias -s {tgz,TGZ}="tar -tf"