alpha
Login
or
Join now
j3s.sh
/
dotfiles
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
my dotz
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
Correct some slowness
author
j3s
date
6 years ago
(Dec 17, 2019, 2:54 PM -0600)
commit
f422c4f3
f422c4f3f105bd037abf2c28ed9e44206766db68
parent
bf19229f
bf19229fd0b5c97e473c4bdf1277694c93e408ba
+22
-4
2 changed files
Expand all
Collapse all
Unified
Split
bin
MACC02VK5ECHTD7
j
jmass
+18
-2
bin/MACC02VK5ECHTD7/j
Reviewed
···
1
1
#!/bin/sh
2
2
-
3
2
query="$1"
4
3
shift 2> /dev/null
5
5
-
ip=$(awless list instances --filter state=running,name="$query" "$@" --format json | jq -r '.[] | [.PrivateIP] | .[]' | head -n1)
4
4
+
5
5
+
text=$(
6
6
+
printf "$*" | \
7
7
+
sed -e 's/bpe/-p browse_prod -r us-east-1/g' | \
8
8
+
sed -e 's/bpw/-p browse_prod -r us-west-2/g' | \
9
9
+
sed -e 's/bse/-p browse_stage -r us-east-1/g' | \
10
10
+
sed -e 's/bsw/-p browse_stage -r us-west-2/g' | \
11
11
+
sed -e 's/bte/-p browse_test -r us-east-1/g' | \
12
12
+
sed -e 's/btw/-p browse_test -r us-west-2/g' | \
13
13
+
sed -e 's/cpe/-p cgraph_prod -r us-east-1/g' | \
14
14
+
sed -e 's/cpw/-p cgraph_prod -r us-west-2/g' | \
15
15
+
sed -e 's/cse/-p cgraph_stage -r us-east-1/g' | \
16
16
+
sed -e 's/csw/-p cgraph_stage -r us-west-2/g' | \
17
17
+
sed -e 's/cte/-p cgraph_test -r us-east-1/g' | \
18
18
+
sed -e 's/ctw/-p cgraph_test -r us-west-2/g'
19
19
+
)
20
20
+
21
21
+
ip=$(awless --local list instances --filter state=running,name="$query" $text --format json | jq -r '.[] | [.PrivateIP] | .[]' | head -n1)
6
22
/usr/local/bin/ssh "$ip"
+4
-2
bin/MACC02VK5ECHTD7/jmass
Reviewed
···
20
20
21
21
ips=$(awless list instances --filter state=running,name="$query" $text --format json | jq -r '.[] | [.PrivateIP] | .[]')
22
22
23
23
-
tmux new-window 'ssh-trash-test'
23
23
+
tmux set default-shell "/bin/sh"
24
24
25
25
+
tmux new-window 'sleep 0.1'
25
26
while IFS= read -r i
26
27
do tmux split-window "ssh $i"
27
27
-
tmux select-layout tiled
28
28
done <<< "$ips"
29
29
30
30
+
tmux set -u default-shell
31
31
+
tmux select-layout tiled
30
32
tmux setw synchronize-panes on