-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaliases
57 lines (43 loc) · 1.12 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
# Filename: aliases
# Purpose: Aliases and functions definitions, shared between bash & zsh
HISTSIZE=10000
HISTFILESIZE=20000
# CC options, disabled, interfers with cgo
#export CC="ccache gcc"
#export CXX="ccache g++"
_ssh() {
ssh -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null "$@"
}
add_sshid() {
ssh-copy-id "$@"
}
_killit() {
# Kills any process that matches a regexp passed to it
ps aux | grep -v "grep" | grep "$@" | awk '{print $2}' | xargs kill
}
if [ -z "\${which tree}" ]; then
tree() {
find $@ -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'
}
fi
# make a dir and cd into it
_mcd() {
mkdir -p "$@" && cd "$@"
}
_portslay() {
kill -9 $(lsof -i tcp:$1 | tail -1 | awk '{ print $2;}')
}
_myshell() {
ps | grep $(echo $$) | awk '{ print $4 }'
}
_lcd() {
cd $(ls -1t | head -1)
}
_pyclean() {
find ${1:-.} \( -name '*.py[co]' -o -name '__pycache__' -o -name '.pytest_cache' \) -exec rm -rf {} \; 2>/dev/null
}
_helm_rm_all(){
helm ls --namespace ${1:-"enaggan"} | cut -f1 | grep -v NAME | xargs helm del --purge
}
alias kc='kubectl'
alias vim='nvim'