-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.aliases
executable file
·111 lines (106 loc) · 3.34 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
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# Filesystem browsing
alias ls='exa --classify --header --all --git --long'
alias ll='exa --classify --header --all --git --long'
alias la='exa --classify --header --all --git --long --sort date --reverse'
alias lt='exa --classify --header --all --git --long --tree'
alias tg='lt | grep '
alias c='clear'
alias cl='c && ll'
alias ca='c && la'
alias l='ls'
# Filesystem general
alias whence='type -a'
alias grep='grep --color'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias df='df -h'
if [ $(uname -s) = "Darwin" ]; then
alias du='ncdu'
else
alias du='ncdu2'
fi
alias psg='pst | grep '
# delete empty dirs
alias ded='find . -type d -empty -print0 | xargs -0 -I {} /bin/rm -r "{}"'
# delete images
alias dim="find -type f \( -iname '*.jp*g' -or -iname '*.png' \) -delete"
# Programs
alias less='less -r'
alias g++='g++ -std=c++11 -Wall'
alias ns='nordvpn status'
alias dm='docker-machine'
alias dps='docker ps -a'
alias dsra='docker stop $(docker ps -aq) && docker rm $(docker ps -aq)'
alias dbu='docker-compose build && docker-compose up -d'
alias drmi='docker rmi $(docker images -a --filter=dangling=true -q) && docker rm $(docker ps --filter=status=exited --filter=status=created -q)'
function dip() {
docker inspect $1 | grep IPAddress
}
# System
alias pst='pstree -cglpst -C age'
alias pstu='pst -u $USER'
function restart_audio() {
systemctl --user restart pulseaudio
rm -r ~/.config/pulse
pulseaudio -k
}
function setup_tv_monitor() {
xrandr \
--fb 3840x2280 \
--output eDP-1-1 --primary --mode 1920x1200 --pos 0x0 --rate 60 \
--output HDMI-0 --mode 1920x1080 --left-of eDP-1-1 --rate 60
}
# SSH
alias church='autossh -M 0 {$SSHUSER}@church.csce.uark.edu'
alias turing='autossh -M 0 {$SSHUSER}@turing.csce.uark.edu'
# Git
alias cg='cl && git status'
alias ga='git add'
alias gau='git add --update'
alias gb='git branch'
alias gba='git branch -a'
alias gbd='git branch --delete '
alias gc='git commit'
alias gcm='git commit --message'
# marks and prefixes comment as fix-up. combine
# with `gr -i --autosquash <last commit to retain>` to merge (rebase) fixups
alias gcf='git commit --fixup'
alias gca='git commit --amend --message'
alias gco='git checkout'
alias gcob='git checkout -b'
alias gcot='git checkout --track'
alias gcom='git checkout main || git checkout master'
alias gcon='git checkout next'
alias gcod='git checkout dev'
alias gcl='git clean -f'
alias gclx='git clean -fx'
alias gcld='git clean -fd'
alias gd='git diff'
alias gdh='git diff HEAD'
alias gdn='git diff --name-only'
alias gi='git init'
alias glg='git log --graph --oneline --decorate --all'
alias gld='git log --pretty=format:"%h %ad %s" --date=short --all'
alias gm='git merge'
alias gma='git merge --abort'
alias gmc='git merge --continue'
alias gp='git pull --no-rebase'
alias gpr='git pull --rebase'
alias gpf='git pull --ff-only'
alias gr='git rebase'
alias gres='git reset'
alias gres1='git reset HEAD~1 --soft'
alias grm='git rm'
alias grs='git restore'
alias grss='git restore --staged'
alias gs='git status'
alias gss='git status --short'
alias gst='git stash'
alias gstu='git stash --include-untracked'
alias gsta='git stash apply'
alias gstd='git stash drop'
alias gstl='git stash list'
alias gstp='git stash pop'
alias gsts='git stash save'
alias gun='git update-index --assume-unchanged'
alias gnun='git update-index --no-assume-unchanged'