-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.bash_aliases_sdal
52 lines (47 loc) · 2.04 KB
/
.bash_aliases_sdal
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
# script for the mounting of servers in ~/.ssh/config
source ~/.ssh/mount_this_ssh.sh
function rs {
OS=$(uname -s)
if [[ $OS == 'Linux' ]]; then
pkill -f rs_tunnel; autossh -M 0 -N -f rs_tunnel && echo "rstudio tunnel created" && xdg-open http://localhost:8787/;
fi
if [[ $OS == 'Darwin' ]]; then
pkill -f rs_tunnel; autossh -M 0 -N -f rs_tunnel && echo "rstudio tunnel created" && open -a "Google Chrome.app" 'http://localhost:8787/';
fi
}
function pg {
OS=$(uname -s)
if [[ $OS == 'Linux' ]]; then
pkill -f pg_tunnel; autossh -M 0 -N -f pg_tunnel && echo "postgresql tunnel created" && xdg-open http://localhost:8080/;
fi
if [[ $OS == 'Darwin' ]]; then
pkill -f pg_tunnel; autossh -M 0 -N -f pg_tunnel && echo "postgresql tunnel created" && open -a "Google Chrome.app" 'http://localhost:8080/';
fi
}
function jp {
OS=$(uname -s)
if [[ $OS == 'Linux' ]]; then
pkill -f jp_tunnel; autossh -M 0 -N -f jp_tunnel && echo "jupyter tunnel created" && xdg-open http://localhost:8000/;
fi
if [[ $OS == 'Darwin' ]]; then
pkill -f jp_tunnel; autossh -M 0 -N -f jp_tunnel && echo "jupyter tunnel created" && open -a "Google Chrome.app" 'http://localhost:8000/';
fi
}
function rs_snowmane {
OS=$(uname -s)
if [[ $OS == 'Linux' ]]; then
pkill -f rs_tunnel_snowmane; autossh -M 0 -N -f rs_tunnel && echo "rstudio tunnel created" && xdg-open http://localhost:8787/;
fi
if [[ $OS == 'Darwin' ]]; then
pkill -f rs_tunnel_snowmane; autossh -M 0 -N -f rs_tunnel && echo "rstudio tunnel created" && open -a "Google Chrome.app" 'http://localhost:8787/';
fi
}
function pg_snowmane {
OS=$(uname -s)
if [[ $OS == 'Linux' ]]; then
pkill -f pg_tunnel_snowmane; autossh -M 0 -N -f pg_tunnel && echo "postgresql tunnel created" && `nohup sh -c 'pgadmin3' > /dev/null &`;
fi
if [[ $OS == 'Darwin' ]]; then
pkill -f pg_tunnel_snowmane; autossh -M 0 -N -f pg_tunnel && echo "postgresql tunnel created" && `open -a pgadmin3`;
fi
}