-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path2
76 lines (66 loc) · 1.96 KB
/
2
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
#set -x
export GOPATH=$HOME/golang
export GOROOT=/usr/local/go
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
export PATH="$HOME/.node/bin:$PATH"
export PATH="$HOME/goaesdk:$PATH"
function kds() {
kubectl delete service @
}
function kdp() {
kubectl delete pod $@
}
function ing() {
kubectl get ing
}
function kdi() {
kubectl delete ing %@
}
function pods() {
kubectl get pods
}
function gip() {
gcloud compute instances list | grep $1 | awk '{print $5}'
}
function gtunnel() {
port=$1
gcompute=$2
ip=$(gip $2)
echo "tunnelling localhost:port to $gcompute:$port"
ssh -L $port:localhost:$port $ip -i ~/.ssh/google_compute_engine -N
}
function ws() {
ssh `wsh`
}
function wsh() {
echo 'johnlabarge.aus.corp.google.com'
}
function firewall_opt_out() {
REASON=$1
PROJECT=$(gcloud config list | grep project | awk '{print $3}')
POLICY="gce-enforcer-fw-opt-out=$REASON"
echo "gcloud alpha projects update $PROJECT --update-labels=\"$POLICY\""
gcloud alpha projects update $PROJECT --update-labels="$POLICY"
#gcloud --project $PROJECT compute project-info add-metadata --metadata firewall-policy=$POLICY
}
function galias_tunnel() {
port=$1
gcompute=$2
ip=$(gip $2)
alias=$3
sudo ifconfig lo0 alias $alias
ssh -L $port:$alias:$port $ip -i ~/.ssh/google_compute_engine -N
}
# The next line updates PATH for the Google Cloud SDK.
source '/Users/johnlabarge/google-cloud-sdk/path.bash.inc'
# The next line enables shell command completion for gcloud.
source '/Users/johnlabarge/google-cloud-sdk/completion.bash.inc'
# added by Anaconda3 4.1.0 installer
export PATH="/usr/local/anaconda3/bin:$PATH"
# added by Anaconda2 4.1.0 installer
export PATH="/usr/local/anaconda2/bin:$PATH"
# added by Anaconda2 4.1.0 installer
export PATH="/usr/local/anaconda2/bin:$PATH"
export PATH=$HOME/bin:$PATH
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*