This repository has been archived by the owner on Oct 17, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaliasrc
134 lines (103 loc) · 4.05 KB
/
aliasrc
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
#!/bin/sh
alias \
cd='fn_cd' \
ka="killall" \
mkd="mkdir -pv" \
trem="transmission-remote" \
e="$EDITOR" \
v="$EDITOR" \
gua="git remote | xargs -L1 git push --all" \
gs='git status' \
grep="grep --color=auto" \
la='ls -F' \
sl="ls -F" \
lsa='ls -A' \
ll='ls -l' \
lsl='ls -l' \
diff="diff --color=auto" \
ccat="highlight --out-format=ansi" \
yt="youtube-dl --add-metadata -i -o '%(upload_date)s-%(title)s.%(ext)s'" \
yta="yt -x -f bestaudio/best" \
YT="youtube-viewer" \
cfv="$EDITOR $HOME/.vimrc" \
cfz="$EDITOR $HOME/.zshrc" \
cfa="$EDITOR $HOME/.aliasrc" \
all="docker ps -a -q" \
python='python3.8 -q' \
python3='python3.8 -q' \
prp='pipenv run python' \
weather='curl wttr.in' \
info='info --vi-keys' \
tmux="tmux -f ${DOTFILES}/tmuxrc" \
ta="tmux attach" \
ruby="/usr/local/opt/ruby/bin/ruby"\
irb="/usr/local/opt/ruby/bin/irb"
# Use neovim for vim if present.
command -v nvim >/dev/null && alias vim="nvim" vimdiff="nvim -d" alias vi="nvim"
# start async matrix with Japanese katakana characters
# source: https://github.com/will8211/unimatrix
# sudo curl -L https://raw.githubusercontent.com/will8211/unimatrix/master/unimatrix.py -o /usr/local/bin/unimatrix
# sudo chmod a+rx /usr/local/bin/unimatrix
alias matrix='unimatrix -naf -s 96 -l k'
# Verbosity and settings that you pretty much just always are going to want.
alias \
cp="cp -iv" \
mv="mv -iv" \
rm="rm -v" \
mkd="mkdir -pv" \
yta="yt -x -f bestaudio/best"
# Colorize commands when possible.
alias \
grep="grep --color=auto" \
egrep="egrep --color=auto" \
fgrep="fgrep --color=auto" \
diff="diff --color=auto" \
ccat="highlight --out-format=ansi"
# These common commands are just too long! Abbreviate them.
alias \
ka="killall" \
trem="transmission-remote" \
sdn="sudo shutdown -h now" \
e="$EDITOR" \
v="$EDITOR" \
# SCHOOL SHORTCUTS
# These single shortcuts jump me to the right directory
alias \
web="cd ~/projects/itp303/" \
os="cd ~/projects/cs350/project-4-cdurham_lee344" \
osd="cd ~/projects/cs350-docker" \
ccd="cd ~/projects/practice/cp_problems" \
# DEVELOPMENT
# dump todo lists into a folder
# TODO: make into a script
alias todo='grep -Ri "todo[:\ ]" .'
# Docker
alias \
dps='docker ps' \
prn='docker system prune -f'
# Rust work
alias \
pg='cd ~/Desktop/playground/' \
lcc='cd ~/projects/challenge/sept_challenge'\
box='cd ~/projects/sandbox/rust/'
# start cs-104 docker env in cs104 directory and start working in /home/work
alias cpup='docker run -ti -v "$HOME/cs104/":/home/work -w /home/work/ csci104 /bin/bash'
alias cphere='docker run -ti -v "$(pwd)":/home/work -w /home/work/ csci104 /bin/bash'
# start cs-104 docker image in cs104 directory
# alias cpstartup='docker run -v "$HOME/cs104/":/work/ -dt --cap-add SYS_PTRACE --security-opt seccomp=unconfined --name csci104 csci104'
alias cpstartup='docker run -it --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v "$(pwd)":/home/work -w /home/work csci104 /bin/bash'
# start up itp compiler development vm
alias compiler='docker run -it -v "$ITP439":/root/uscc/code -w /root/uscc/code compiler /bin/bash'
# compile a c++ program with ALL the fucking warnings
# usage: compile <FILE>.cpp OR compile <FILE>.cpp -o <FILE>.o
alias compile='g++ --std=c++11 -Wextra -pedantic -Wall -Wshadow
\ -Wsign-conversion -Wsign-promo -Wstrict-null-sentinel -Werror'
alias supos='docker run -it --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v "$HOME/projects/cs350/":/root -w /root --name cs350 cs350_32 /bin/bash'
alias osup='docker run -it --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v "$HOME/projects/cs350/":/root -w /root cs350_32 /bin/bash'
alias oshere='docker run -it --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v "$(pwd)":/root -w /root cs350_32 /bin/bash'
# docker
alias d="docker"
alias stopall="docker stop \$(docker ps --format '{{ .ID }}')"
# global
# alias -g <name>="command"
# also see https://linuxhint.com/configure-use-aliases-zsh