-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zsh_aliases
69 lines (57 loc) · 1.86 KB
/
.zsh_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
# .zsh_aliases
alias riscv-tools-container="podman exec --interactive --tty --user riscv --work-dir /home/riscv riscv-tools-1.7 /bin/bash"
case $(uname) in
Darwin) DEVICE="MAC" ;;
Linux)
HN=$(hostname)
if [[ $HN == *.brc ]] || [[ $HN == *.savio* ]]; then
DEVICE="SAVIO"
else
DEVICE="LINUX"
fi
;;
esac
if [ $DEVICE = "MAC" ]; then
alias gvim='open -a MacVim'
alias subl="open -a Sublime\ Text"
alias mdown="open -a MacDown"
alias ipynb="jupyter notebook"
alias anon='. anon'
alias pgstart="pg_ctl -D /usr/local/var/postgres start"
alias pgstop="pg_ctl -D /usr/local/var/postgres stop"
alias yt-sound="youtube-dl -x"
alias journal="vim $HOME/Desktop/Journal/dated/$(date '+%Y-%m-%d')"
alias gtkwave="open -a gtkwave"
else
alias ls='ls -F --color=auto'
fi
if [ $DEVICE = "SAVIO" ]; then
alias slowmode='. slowmode'
alias tosavio="srun --pty -A ac_scsguest -p savio -t 00:05:00 bash -i"
alias myjobs="squeue -u $USER"
alias mod='module'
alias ml='module load'
alias mrm='module rm'
alias wall='echo "please reconsider your life decisions"'
alias findmod='find /global/software/sl-7.x86_64/modfiles -type d -exec ls -d {} \; | grep'
fi
if [ $DEVICE = "LINUX" ]; then
alias ssh-watch='sudo tail -f /var/log/auth.log | grep ssh'
alias ssh-recent='sudo less /var/log/auth.log | grep ssh | tail -n 10'
alias open='xdg-open'
fi
alias py='python3'
alias venvup=". venvup"
alias newvenv="python3 -m venv venv"
alias jlab="jupyter-lab"
alias tma="tmux attach -t"
alias tmn="tmux new -s"
alias l='ls'
alias ll='ls -l'
alias la='ls -a'
alias lla='ls -la'
alias finduser='grep /etc/passwd -e'
alias findcompiler='objdump --full-contents --section=.comment'
alias todos='rg --ignore -i todo'
alias coup='conda activate'
alias cdown='conda deactivate'