-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zsh_aliases
98 lines (86 loc) · 2.87 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
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
# navigation aliases
alias up="cd .."
alias desk="cd ~/Desktop"
alias down="cd ~/Downloads"
alias home="cd ~"
alias repos="cd ~/Desktop/GitHub"
alias site="cd ~/Desktop/ExtraProjects/Personal\ Website"
alias screenshots="cd ~/Desktop/Screenshots"
alias track="cd ~/Desktop/GitHub/classtrack"
alias extras="cd ~/Desktop/ExtraProjects"
alias cs="cd ~/Desktop/CompSci"
alias ds="cd ~/Desktop/DataScience"
# aliases
alias rc="vim ~/.zshrc"
alias vrc="vim ~/.vimrc && vim +PlugInstall +qall"
alias v="vim"
alias aliases="vim ~/.zsh_aliases && source $HOME/.zshrc"
alias lsa="ls -A"
alias ll="ls -l"
alias lsla="la -lA"
alias wttr='curl wttr.in/$1'
alias esfix="eslint --fix"
alias src="source ~/.zshrc"
alias gcm="git checkout master"
alias yt="youtube"
alias py="python3"
alias apps="/Applications"
#alias pip3="python3 -m pip"
#alias pip="pip3"
alias ftemp="/usr/local/bin/./osx-cpu-temp -F"
alias ctemp="/usr/local/bin/./osx-cpu-temp -C"
alias spice="spicetify backup apply"
alias calc="bc"
alias caff="caffeinate -d"
# npm aliases
alias start="npm start"
alias build="npm run build"
alias serve="npm run start:server"
alias start-client="npm run start-client"
alias spot="open /Applications/Spotify.app"
alias ff="open /Applications/Firefox.app"
alias slack="open /Applications/Slack.app"
alias R="open /Applications/RStudio.app"
alias qr="curl qrcode.show -d"
# seeing usage on the disk of the specific folder/path
alias storage="du -h -d1"
alias topten="history | commands | sort -rn | head"
# open current director in file explorer
alias owd="ofd"
alias rd="rm -rf"
# bin <-> conversions
alias jsBinInt="echo 'let binary=0001\nparseInt(binary, 2)' && node"
alias jsIntBin="echo 'let integer=7\ninteger.toString(2)' && node"
# git aliases
# you can grab a single file from a repo with $ curl https://raw.githubusercontent.com/github/gitignore/main/Rust.gitignore
alias gf="git fetch"
alias ga="git add"
alias gcom="git commit -m"
alias gp="git push origin"
# branches
alias gst="git status" # branch status
alias gba="git branch -a"
alias gc="git checkout" # switch
alias gcb="git checkout -b" # create branch and switch to it
alias gbd="git branch -d" # branch delete
alias gbD="git branch -D" # force branch delete
alias gpd="git push origin --delete" # push commit of branch deletion
alias gd="git diff"
alias gpl="git pull origin"
alias grst="git reset"
alias unstage="git restore --staged"
alias gl="git log"
alias glp="git log -p"
alias gm="git merge"
alias ggraph="git log --graph --pretty=\"%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset\" --all"
# ... functions? yes
# make a gif? yes plz
# alias giffy="ffmpeg -i $1 -pix_fmt rgb8 -r 10 $2 && gifsicle -03 $2 -o $2"
function makegif() {
if [ "$#" -ne 1 ]; then
echo "Command takes 1 arg. Expected: name of file."
return 1;
else
ffmpeg -i "$1".mov -pix_fmt rgb8 -r 10 "$1".gif && gifsicle -03 "$1".gif -o "$1".gif
fi
}