-
Notifications
You must be signed in to change notification settings - Fork 1
/
.aliasrc
252 lines (205 loc) · 5.66 KB
/
.aliasrc
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
#!/bin/bash
alias sa='source ~/.aliasrc'
alias va='vim ~/.aliasrc'
alias ga='alias | grep'
alias la='less ~/.aliasrc'
alias gp='grep'
alias prj='cd ~/dev/projects/'
alias aws='"C:\dev\tools\AWSCLI\aws.exe"'
alias cc='clear'
alias ll='ls -lah'
alias lr='ls -larth'
alias pwdd='pwd | sed 's:.*/::''
### Git ######
alias grso='git remote show origin'
alias grv='git remote -v'
alias grvv='git remote -vv'
alias gcl='git clone'
alias gaa='git add --all'
alias gu='git add -u'
alias gaj='git add **/*.java'
alias gc='git commit'
alias gcmm='git commit -m'
alias gca='git commit --amend'
alias gcaa='git commit --amend --reset-author'
alias gcaag='git commit --amend --author "Barry Evans <[email protected]>"'
alias gcad='GIT_COMMITTER_DATE="`date`" git commit --amend --date "`date`"'
alias grb='git rebase'
alias grbi='git rebase -i'
alias grb5='git rebase -i HEAD~5'
alias grbom='grb origin/master'
alias gcp='git cherry-pick'
alias gcpc='git cherry-pick --continue'
alias gcpa='git cherry-pick --abort'
alias gb='git branch'
alias gba='git branch -a'
alias gbg='git branch --v | grep gone'
alias gbD='git branch -d'
alias s='gs'
alias gs='git status'
alias gf='git fetch -t --prune'
alias gd='git diff -w'
alias gdc='git diff -w --cached'
alias gds='git diff -w --stat'
alias gds1='git diff -w --stat HEAD~1'
alias gdss='git diff -w --shortstat'
alias gfp='git fetch -t --prune;git pull --no-commit --rebase'
alias gc='git checkout'
alias gcm='git checkout master'
alias gcd='git checkout develop'
alias gct='git checkout --track'
alias gcb='git checkout -b'
alias gl='git log'
alias glo='git log --oneline --decorate'
alias gloa='git log --oneline --all --decorate'
alias glg='git log --graph --oneline --decorate'
alias glga='git log --graph --oneline --all --decorate'
alias glgt='git log --graph --oneline --all --decorate -n 10'
alias glp='git log --pretty=format:"%C(yellow)%h|%Cred%ad|%Creset%an|%Cgreen%d %Creset%s" --date=short'
alias glpd='git log --pretty=format:"%C(yellow)%h|%Cred%ad|%Creset%an|%Cgreen%d %Creset%s" --date=short --relative-date'
alias gst='git stash'
alias gsp='git stash pop'
alias gsa='git stash apply'
alias gss='git stash show'
alias gsl='git stash list'
alias gspp='git stash;git pull;git stash pop;'
alias gr='git revert '
alias grh='git reset --hard'
alias grm='git rebase master'
alias grom='git rebase origin/master'
alias grd='git rebase develop'
alias grdi='git rebase develop -i'
alias grod='git rebase origin/develop'
alias grodi='git rebase origin/develop -i'
alias grc='git rebase --continue'
alias gra='git rebase --abort'
alias gpl='git pull'
alias gup='git pull --no-commit --rebase'
alias gupm='git pull --no-commit --rebase origin master'
alias gpu='git push'
alias gpf='git push --force'
alias gpfl='git push --force-with-lease'
alias gpft='git push --tags --force'
### Git :::::::::::::: ######
### MVN :::::::::::::: ######
alias mc='mvn clean'
alias mct='mvn clean test'
alias mci='mvn clean install'
alias mcis='mvn clean install -DskipTests'
alias mciss='mvn clean install -Dmaven.test.skip=true'
alias mcp='mvn clean package'
alias mcps='mvn clean package -DskipTests'
alias mcpss='mvn clean package -Dmaven.test.skip=true'
alias msbr='mvn spring-boot:run'
### MVN :::::::::::::: ######
### Node/npm ######
alias npmi='npm --loglevel info'
alias npmv='npm --loglevel verbose'
alias nin='npm install'
alias nd='npm run dev'
alias nk='npm run karma'
alias nkh='npm run karma-headless'
alias nre='npm run e2e'
alias nrb='npm run build'
### Node/npm :::::::::::::: ######
alias psh='powershell'
###### Bash functions ######
sq2() {
squash 2
}
sq() {
squash $1
}
squash() {
git rebase -i HEAD~$1
}
gcdp() {
git checkout develop;
gup;
}
gcmp() {
git checkout master;
gup;
}
alias grho='git-reset-hard-origin'
git-reset-hard-origin() {
s=`git branch | grep \* | cut -d ' ' -f2-`
grh origin/$s
}
alias grob='git-replace--origin-branch'
git-replace--origin-branch() {
s=`git branch | grep \* | cut -d ' ' -f2-`
git push origin :$s
gpu
}
alias gro='git-rebase-origin'
git-rebase-origin () {
git rebase -i origin/$1
}
alias groc='git-rebase-origin-current'
git-rebase-origin-current () {
s=`git branch | grep \* | cut -d ' ' -f2-`
git rebase -i origin/$s
}
alias gdo='git-diff-origin'
git-diff-origin () {
s=`git branch | grep \* | cut -d ' ' -f2-`
git diff -w origin/$s
}
alias gdos='git-diff-origin-stat'
git-diff-origin-stat () {
s=`git branch | grep \* | cut -d ' ' -f2-`
git diff -w origin/$s --stat
}
### Docker ######
alias dk='docker kill `(docker ps -q)`'
alias dp='docker ps'
alias dq='docker ps -q'
alias dr='docker rm $@'
alias did='ID=$(docker ps -q)'
alias gbd='./gradlew build docker'
alias gcbd='./gradlew clean build docker'
alias ds='docker-stop'
docker-stop() {
docker stop $(docker ps -q -f "name=$1");
docker rm $1;
}
### Productivity shortcuts ######
alias add-todo='add-todo'
add-todo() {
echo $@ >> ~/dev/todos.txt
}
### Gradle ######
alias bar='build-app-run'
build-app-run () {
build-app; \
build-docker-run $1
}
alias ba='build-app'
build-app () {
./gradlew build -x test;
}
alias bt='build-app-test'
build-app-test () {
./gradlew clean build jacocoTestReport docker;
}
alias bd='build-docker'
build-docker() {
docker build -t $1 $2
}
alias bdr='build-docker-run'
build-docker-run () {
build-docker $1; \
docker-run $1
}
alias dcr='docker-container-run'
docker-container-run () {
docker container run --rm \
-p 8000:8000 \
-p 8080:8080 \
-e JPDA_ADDRESS=8000 \
-e TOMCAT_CONNECTOR_PROXY_PORT=8080 \
-e TOMCAT_CONNECTOR_SCHEME=http \
-e TOMCAT_CONNECTOR_SECURE=false \
--name $1 $2
}