-
Notifications
You must be signed in to change notification settings - Fork 11
/
shell-aliases
86 lines (71 loc) · 2.56 KB
/
shell-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
alias rr=". ~/.zshrc"
alias mm='make minimal'
alias py.test='py.test --tb=native'
alias pytest='pytest --tb=native'
# ocf
alias ocf="ssh ckuehl@ssh.ocf.berkeley.edu"
alias ocfs="ssh ckuehl@supernova.ocf.berkeley.edu"
# non-ssh
alias dquilt="quilt --quiltrc=${HOME}/.quiltrc-dpkg"
alias badssh="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
alias smallpdf="convert -density 300 -quality 25 -compress jpeg"
alias venv='T=$(mktemp -d) && { virtualenv -p python3 "$T" && . "${T}/bin/activate" }'
alias venv2='T=$(mktemp -d) && { virtualenv -p python2 "$T" && . "${T}/bin/activate" }'
alias tmp='cd $(mktemp -d)'
alias nenv='T2=$(mktemp -d) && { venv && pip install nodeenv && nodeenv --prebuilt "${T2}/nenv" && . "${T2}/nenv/bin/activate" }'
alias youtube-mp3='youtube-dl --extract-audio --audio-format mp3 --prefer-ffmpeg'
alias speedtest='curl -o /dev/null http://speedtest.newark.linode.com/100MB-newark.bin'
# git
alias ga="git add -A"
alias gaa="git add"
alias gp="git push"
alias gl="git log --decorate"
alias gll="git log --decorate --pretty=fuller"
alias gls='git ls-files'
alias gs="git status"
alias gd="git diff -M"
alias gdh="git diff HEAD -M"
alias gdc="git diff --cached -M"
alias gc="git commit -v"
alias gb="git branch -vv"
alias gch="git checkout"
alias gpu="git pull"
alias gcp="git cherry-pick"
alias gm="git merge"
alias gso="git show --pretty=fuller --decorate -M"
alias gg="git grep -n"
alias gst="git stash"
alias gss="git stash show -p"
# core utils
alias ls="ls -h --color=auto"
alias ll="ls -l"
alias la="ls -lA"
alias grep="grep --line-buffered --color=auto"
# typos
alias l="ls"
alias sl="ls"
alias s="ls"
alias dc="cd"
alias c="cd"
alias d="cd"
alias gti="git"
alias Gerp="grep"
alias gerp="grep"
alias Grep='grep'
alias Less='less'
# functions
showcolors() {
for i in {0..255} ; do
printf "\x1b[38;5;${i}mcolour${i}\n"
done
}
sum() {
awk '{s+=$1} END {print s}'
}
alias focal='docker run -v $(pwd):/mnt:rw -ti public.ecr.aws/docker/library/ubuntu:focal bash'
alias jammy='docker run -v $(pwd):/mnt:rw -ti public.ecr.aws/docker/library/ubuntu:jammy bash'
alias noble='docker run -v $(pwd):/mnt:rw -ti public.ecr.aws/docker/library/ubuntu:noble bash'
alias buster='docker run -v $(pwd):/mnt:rw -ti public.ecr.aws/docker/library/debian:buster bash'
alias bullseye='docker run -v $(pwd):/mnt:rw -ti public.ecr.aws/docker/library/debian:bullseye bash'
alias bookworm='docker run -v $(pwd):/mnt:rw -ti public.ecr.aws/docker/library/debian:bookworm bash'
alias trixie='docker run -v $(pwd):/mnt:rw -ti public.ecr.aws/docker/library/debian:trixie bash'