-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.bash_ultrawalker
215 lines (200 loc) · 6.24 KB
/
.bash_ultrawalker
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
# BASH Profile Related
alias bashprofile_reset='source ~/.bash_profile && clear' #BASH Profile Reset
alias bashprofile_edit='vim ~/.bash_profile' #BASH Profile Edit
# Get Info Like CPU,MEM,Storage
alias cpuinfo='cat /proc/cpuinfo'
alias storage='df -h'
alias storages='du -sh * | sort'
alias dush='du -sh'
# some stuff for 'w' other procs 'last' ...
# Directory & Listing Related
alias c='clear'
alias go='cd'
alias p='clear && pwd'
alias bp='cd ../ && pwd && ls'
alias cdu='cd -'
alias cdb='cd ..'
alias .='cd ../'
alias ..='cd ../../'
alias ...='cd ../../../'
alias ....='cd ../../../../'
alias .....='cd ../../../../../'
alias dl='cd ~/Downloads/'
alias count='ls -1 | wc -l'
alias asc='c && ls -lahSr'
alias desc='c && ls -lahS'
alias l='ls -lCF --color'
alias ll='ls -l --color'
alias l.='ll -d .*'
alias lsf='ll -a'
alias lss='lsf -h'
alias cls='c && lss'
alias clsi='cls -i'
alias lsh='ls -d .[!.]?*' #ls hidden
alias clsh='c && lsh'
# Network Related
alias ip="ip -o -4 a s | awk -F'[ /]+' '$2!~/lo/{print $4}'"
alias ip1="ip -o -4 addr show eth0 | grep -v ": lo " | sed 's/ \+/\t/g' | cut -f 4 | cut -d\/ -f1"
alias p8='p 8.8.8.8'
alias p84='p 8.8.4.4'
alias p4='p 4.2.2.2'
alias m='mtr'
alias copysshkey="'cat >> ~/.ssh/authorized_keys' < ~/.ssh/id_rsa.pub"
# Process Related
alias pz='ps -aux | grep -i'
alias mpz='ps aux | grep -i' #for MAC
alias signals='kill -l'
# Grep Related
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
alias ack='grep-ack'
# Moving/Coping/Creating/Removing Related
alias rm='rm -iv'
alias cp='cp -iv'
alias copy='cp'
alias mv='mv -iv'
alias move='mv'
alias mkdir='mkdir -iv'
alias md='mkdir'
alias show='cat'
alias endof='tail'
alias bak='cp filename{,.bak}'
alias original='cp filename{,.original}'
# VIM Related
export EDITOR='vim'
alias edit='vim'
alias vi='vim'
alias nano='vim'
alias :q='exit'
alias ZZ='exit'
alias q='exit'
alias done='exit'
alias z=':w !sudo tee % '
alias Z='z'
# MAN Related
alias help=man
# History & Sudo Related
alias h='history'
alias hc='history -cw'
alias s='sudo'
alias ss='s !!'
alias s!='s !!'
alias bankai='sudo su'
alias rootme='sudo su'
alias godmode='sudo su'
alias llvim='^ll^sudo vim'
alias nanovim='^nano^vim'
alias vivim='^vi^vim'
alias catvim='^cat^vim''
alias v1='!! -v'
alias v2='!! -vv'
alias v3='!! -vvv'
# Server Cheats
alias html='cd /var/www/html/'
alias htmlcls='cd /var/www/html/ && clear && ls -lahi'
alias ipt='sudo system-config-firewall-tui'
alias netstats='sudo netstat -tulpn'
# PHP Related Cheats
alias pu='phpunit --verbose --colors'
alias t="./vendor/bin/codecept"
alias tr="c && ./bin/startup.sh && t run"
alias tra="tr acceptance"
alias trf="tr functional"
alias tri="tr integration"
alias trs="tr Selenium"
alias tru="tr unit"
alias trc="sudo ./vendor/bin/codecept run --report --html --coverage"
alias trco="trc && open ./tests/_log/coverage/index.html -a 'Google\ Chrome'"
alias trfo="trf && open ./tests/_log/coverage/index.html -a 'Google\ Chrome'"
alias s4="java -jar ~/bin/selenium-server-standalone-2.37.0.jar"
alias a="php artisan"
alias artizan="a"
alias phpcirb="~/Web/PHPCI/console && c && phpci phpci:run-builds -vvv"
# Git SCM Cheats
alias g=git
alias gi='git init'
alias gs='clear && git status'
alias ga='git add'
alias gad='git add .'
alias gaa='git add --all'
alias gau='git add --update'
alias gc='echo "for commiting use \"gcm\" & for checkout use \"gco\" this command is just for CLONING! - با تشکر" && git clone'
alias gcm='git commit -m '
alias gce='git commit -a'
alias gcam='git commit --amend -m'
alias gl='git log'
alias glg='git log --oneline --graph --all --decorate'
alias glgc='clear && git log --oneline --graph --all --decorate'
alias gls='git log --pretty=format: --name-only --diff-filter=A | sort '
alias glp='git log --pretty=oneline'
alias glps='git log --pretty=oneline --stat'
alias gl1d='git log --since=1.day.ago'
alias gl7d='git log --since=7.days.ago'
alias gl1w='git log --since=1.week.ago'
alias gd='git diff'
alias gds='git diff --staged'
alias gdh='git diff HEAD'
alias gdh1='git diff HEAD^'
alias gdh2='git diff HEAD^^'
alias gdh5='git diff HEAD~5'
alias grh='git reset HEAD' #unstage some files
alias gco='git checkout' #undo to last commit
alias grsh='git reset --soft HEAD^' #role back to stage!
alias grhh='git reset --hard HEAD^' #role back fully to last commit! //be careful
alias gra='git remote add'
alias grao='git remote add origin'
alias grs='git remote -v'
alias gp='git push'
alias gpo='git push -u origin'
alias gpom='git push -u origin master'
alias gpt='git push --tags'
alias gbs='git branch -a'
alias gb='git branch' #git branch test 07aeec9 --> to make a branch on an old commit!
alias gbr='git branch -r'
alias gbd='git branch -d'
alias grso='git remote show origin'
alias gm='git merge'
alias grm='git rm'
alias grmc='git rm --cached'
alias gt='git tag'
alias gts='git tag'
alias gta='git tag -a'
alias gbl='git blame --date short'
alias gcl='git config --list'
alias gitremoveallmergedbranches='git branch --merged | grep -v "\*" | xargs -n 1 git branch -d'
# Slips
alias dc='cd'
alias sl='ls'
alias vm='mv'
alias pc='cp'
alias mr='rm'
alias us='su'
alias sp='ps'
alias sl='ls'
alias ud='du'
alias fd='df'
# Colorful BASH
BLACK="\[\033[0;38m\]"
RED="\[\033[0;31m\]"
RED_BOLD="\[\033[01;31m\]"
BLUE="\[\033[01;34m\]"
GREEN="\[\033[0;32m\]"
export PS1="(\`if [ \$? = 0 ]; then echo \[\e[32m\]^_^\[\e[0m\]; else echo \[\e[31m\]O_O\[\e[0m\]; fi\`),\[\e[00;34m\]\d\[\e[0m\]\[\e[00;37m\]:\[\e[0m\]\[\e[01;32m\]\u\[\e[0m\]\[\e[00;37m\]@\[\e[0m\]\[\e[00;36m\]\h\[\e[0m\]\[\e[00;37m\]:\[\e[0m\]\[\e[00;35m\]\w\[\e[0m\]\[\e[00;37m\]\[\e[0m\]\[\e[32m\]$(git-branch-prompt)\[\e[0m\] \[\e[0m\]\[\e[00;31m\]\\$\[\e[0m\]\[\e[00;37m\] \[\e[0m\]"
export CLICOLOR=1
export LSCOLORS="ExGxBxDxCxEgEdxbxgxcxd"
export GREP_OPTIONS='--color=auto'
export GREP_COLOR='1;32'
export TERM='xterm-256color'
# from Command Line Foo
# qs -qah
# !!:s/q/l ==> ls -qah
# !!:s/q/l/g ===> ls -lah
# -----------------------------
# a macro to detect these:
# got --> git
# giit --> git
# cd/var --> cd /var
# sduo!! --> sudo !!
# -----------------------------
#!!:gs/foo/bar