-
Notifications
You must be signed in to change notification settings - Fork 0
/
aliases
162 lines (129 loc) · 4.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
## rust
export PATH=$PATH:~/.cargo/bin
export RUST_SRC_PATH='~/Projects/rust/src'
## go
export GOPATH=~/.go
export PATH=$PATH:$GOPATH/bin
## ping
alias p='ping'
alias po='ping -c 3 -w 3 4.2.2.2'
alias pi='ping -c 3 -w 3 172.16.52.28'
alias pg='ping www.google.com'
#ls
alias l='ls -l'
alias la='ls -al'
alias ll='ls -l --color=tty'
alias ls='ls --color=tty'
alias lf='ls -F --color=tty'
#basic commands
#alias cp='cp -i'
#alias mv='mv -i'
#alias rm='rm -i'
alias vi='vim'
alias which='alias | /usr/local/bin/which --tty-only --read-alias --show-dot --show-tilde'
alias pcat='pygmentize'
alias subl='subl -n .'
#coding commands
git_pull(){
if [[ -z "$1" ]]; then
BR="sm-clj"
else
BR="$1"
fi
set -x
git checkout master && git pull upstream master && git push origin master && git checkout $BR && git rebase master && git push origin $BR
set +x
}
git_push_upstream(){
if [[ -z "$1" ]]; then
BR="sm-clj"
else
BR="$1"
fi
set -x
git checkout master && git merge $BR && git push upstream master && git push origin master && git checkout $BR
set +x
}
lein_rebuild(){
set -x
lein clean
lein deps
lein compile
set +x
}
alias git-push='git push origin sm-clj'
alias git-pull='git_pull'
alias git-push-upstream='git_push_upstream'
alias lein-rebuild='lein_rebuild'
#alias lein-rebuild='echo "+ lein clean";lein clean;echo "+ lein deps"; lein deps;echo "+ lein compile"; lein compile'
#alias git-pull='git checkout master && git pull upstream master && git push origin master && git checkout sm-clj && git rebase master && git push origin sm-clj'
#alias git-push-upstream='git checkout master && git merge sm-clj && git push upstream master && git push origin master && git checkout sm-clj'
#ssh commands
alias ssh-remove='ssh-add -D'
alias ssh_add_rh='ssh-add -D; ssh-add ~/.ssh/id_rsa ~/.ssh/automatjon'
alias fart='echo I think I pooed a little...'
#remote servers
sshxyc(){
if ( ! [ -z "$1" ] && ! [ -z "$2" ] ); then
echo $1
echo $2
else
echo $1
fi
}
alias sshlss='ssh -XYC [email protected]'
alias sshncsu='ssh -XYC [email protected]'
alias x2112='ssh -XYC [email protected]'
alias xanadu='ssh -XYC [email protected]'
alias jmolet='ssh -XYC [email protected]'
alias cygnus='ssh -XYC [email protected]'
alias mgmt5='ssh -XYC [email protected]'
alias mgmt5-console='console -M console.lab.bos.redhat.com mgmt5.rhq.lab.eng.bos.redhat.com'
alias qeblade4='rssh qeblade4.rhq.lab.eng.bos.redhat.com'
alias qeblade25='rssh qeblade25.rhq.lab.eng.bos.redhat.com'
function ssh-vm(){
rssh jmolet-vm${1}
}
function ssh-vm-vnc(){
vncviewer jmolet-vm${1}.usersys.redhat.com:2 --DesktopSize=1024x768
}
function ssh-vm-console(){
console-connect xanadu.usersys.redhat.com jmolet-vm${1}
}
alias jmolet-vm1='rssh jmolet-vm1'
alias jmolet-vm1-vnc='vncviewer jmolet-vm1.usersys.redhat.com:2 --DesktopSize=1024x768'
alias jmolet-vm1-console='console-connect xanadu.usersys.redhat.com jmolet-vm1'
alias jmolet-vm2='rssh jmolet-vm2'
alias jmolet-vm2-vnc='vncviewer jmolet-vm2.usersys.redhat.com:2 --DesktopSize=1024x768'
alias jmolet-vm2-console='console-connect xanadu.usersys.redhat.com jmolet-vm2'
alias jmolet-vm3='rssh jmolet-vm3'
alias jmolet-vm3-vnc='vncviewer jmolet-vm3.usersys.redhat.com:2 --DesktopSize=1024x768'
alias jmolet-vm3-console='console-connect xanadu.usersys.redhat.com jmolet-vm3'
alias jmolet-vm4='rssh jmolet-vm4'
alias jmolet-vm4-vnc='vncviewer jmolet-vm4.usersys.redhat.com:2 --DesktopSize=1024x768'
alias jmolet-vm4-console='console-connect xanadu.usersys.redhat.com jmolet-vm4'
alias jmolet-vm0='rssh jmolet-vm0'
alias jmolet-vm0-vnc='vncviewer jmolet-vm0.usersys.redhat.com:2 --DesktopSize=1024x768'
alias jmolet-vm0-console='console-connect xanadu.usersys.redhat.com jmolet-vm0'
alias jmolet-5server='rssh jmolet-5server'
alias jmolet-5server-console='console-connect xanadu.usersys.redhat.com jmolet-5server'
alias jmolet-cp0='rssh jmolet-cp0'
alias jmolet-cp1='rssh jmolet-cp1'
alias jmolet-cp2='rssh jmolet-cp2'
function ssa() {
cd ~/Projects/spine
ssh ansibler@$(env/bin/python script/node_selector.py ${1})
}
function ssap() {
cd ~/Projects/spine
export PURGE_EC2_CACHE=true
ssh ansibler@$(env/bin/python script/node_selector.py ${1})
}
function i() {
cd ~/Projects/spine
source env/bin/activate
ansible/inventory/ec2
}
function spinedel() {
./spine cluster delete $i; ./spine db delete $i_db; ./spine lb delete $i
}