-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.bash_aliases
More file actions
58 lines (49 loc) · 1.61 KB
/
.bash_aliases
File metadata and controls
58 lines (49 loc) · 1.61 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
export EDITOR=vim
export VISUAL=vim
export PATH="~/node_modules/@angular/cli/bin:~/code/scripts:$PATH"
_xfunc git __git_complete gp _git_push
_xfunc git __git_complete gl _git_pull
function update_ubuntu() {
sudo apt update
sudo apt dist-upgrade -y
sudo apt autoremove -y
}
function update_rhel() {
sudo dnf upgrade -y
}
function update_system() {
if command -v apt $>/dev/null; then
update_ubuntu
fi
if command -v dnf $>/dev/null; then
update_rhel
fi
if command -v needrestart $>/dev/null; then
sudo needrestart
fi
}
function tv() {
if [[ ! -d "../../../../videos/TV/${1}" ]]; then
echo "${1} directory not found in TV section"
fi
rsync -avP --exclude=*sample* *.mkv "../../../../videos/TV/${1}"
}
alias gp='git push'
alias gpt='git push --tags'
alias gl='git pull'
alias gb='git branch'
alias gbr='git for-each-ref --format "%(refname:short)" refs/heads | grep -vw "master\|main\|prod" | xargs git branch -D'
alias vim='vim -p'
alias update='update_system'
alias clean='rm -f *.xz *.deb *.dsc *.changes *.build *.gz'
alias dc='docker-compose'
alias dcu='dc build --pull && dc pull && dc up -d'
alias dbx='docker buildx build --platform linux/arm64,linux/amd64'
alias tmuxa='tmux new-session -A -s Admin -n bartender'
alias motd='cat /run/motd.dynamic'
alias yp='yadm push'
alias yl='yadm pull'
alias ym='yadm'
alias movie='rsync -avP *.mkv ../../../../videos/Movies/.'
alias kid='rsync -avP *.mkv ../../../../videos/Kids/.'
alias rclone='rclone --client-cert ~/.config/rclone/IDTEC.crt --client-key ~/.config/rclone/IDTEC.key --no-check-certificate=true'