-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig.sh
More file actions
83 lines (67 loc) · 1.92 KB
/
config.sh
File metadata and controls
83 lines (67 loc) · 1.92 KB
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
#!/bin/sh
sudo apt update
# install gh cli
sudo apt install gh
#configure bashrc to add aliases
sudo tee -a /etc/bash.bashrc << EOT
# kube aliases
alias k='kubectl'
alias kubetcl='kubectl'
alias ka='kubectl apply '
alias kg='kubectl get'
alias kga='kubectl get all'
alias kgi='kubectl get ingress'
alias kgp='kubectl get pods'
alias kd='kubectl describe'
alias kdp='kubectl describe pod'
alias kdel='kubectl delete'
alias kl='kubectl logs'
alias kex='kubectl exec -it'
alias kpf='kubectl port-forward'
alias ksc='kubectl config set-context --current --namespace'
alias ksci='kubectl config set-context --current --namespace user-inesh'
# helm aliases
alias h='helm'
alias hl='helm ls'
# keep kube & helm autocompletion with k & h aliases
complete -o default -F __start_kubectl kubectl
complete -o default -F __start_kubectl kubetcl
complete -o default -F __start_kubectl k
complete -o default -F __start_helm helm
complete -o default -F __start_helm h
# watch to keep autocompletion when using
alias w='watch '
alias watch='watch '
# git aliases
alias gc='git clone'
alias gd='git diff'
alias gcm='git commit -m'
alias gs='git status'
alias gl='git logs'
alias glo='git logs --oneline'
alias gp='git push'
alias ga='git add'
# divers
alias stp='sudo !! '
# configure git
git config --global diff.algorithm histogram
git config --global push.autoSetupRemote true
# try
git config --global help.autocorrect prompt
git config --global merge.conflictstyle zdiff3
EOT
# config vim
sudo tee -a /etc/vim/vimrc << EOT
filetype plugin indent on
set showmatch
set incsearch
set mouse=a
set number
syntax on
set incsearch
EOT
#add extension to vscode
if command -v code-server; then
code-server --install-extension dvirtz.parquet-viewer
jq '. + {"workbench.startupEditor": "terminal" }' ${HOME}/.local/share/code-server/User/settings.json > ${HOME}/tmp.settings.json && mv ${HOME}/tmp.settings.json ${HOME}/.local/share/code-server/User/settings.json
fi