-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc.alias
101 lines (92 loc) · 2.33 KB
/
.zshrc.alias
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
alias a="alias"
a dateh="date +%d-%m-%y"
a rm='rm -f'
a wget='wget -c'
a rm='rm -f'
a wget='wget -c'
a p='n-panelize'
a b='brew'
a n='npm'
a ka='killall'
a k9='f() { killall -9 ${1}};f'
a large-files="du -ah . | sort -nr | head"
a tf='tail -f '
a ag='ag -a'
a jtags="ctags -R src && sed -i '' -E '/^(if|switch|function|module\.exports|it|describe).+language:js$/d' tags"
a f='fuck'
a sl='screen -list'
a sr'screen -r'
a sd'screen -d'
# GPT
a gpt='python /Users/yannvr/dev/cloned/Speak_with_ChatGPT/start_conversation.py'
a gypton=gpt
a myip="curl http://ipecho.net/plain; echo"
a whatsmyip=myip
a fix-gitignore='git rm -r --cached . && git add . && git commit -m "fixed untracked files"'
a h="htop"
HAS_NVIM=`which nvim`
if [ ! -z $HAS_NVIM ]
then
a v="nvim"
a nv="nvim -c OpenSession"
a vv="vim -c OpenSession"
a nvp="nvim --noplugin"
a vp="vim --noplugin"
a nvo="nvim -c OpenSession"
a v='nvim -c "set noautochdir" --cmd "set noautochdir"'
# a nv="nvim -c OpenSession -c 'set noautochdir'"
else
a v="vim"
a nv="vim -c OpenSession"
a vv="vim -c OpenSession"
a nvp="vim --noplugin"
a vp="vim --noplugin"
a nvo="vim -c OpenSession"
a v='vim -c "set noautochdir" --cmd "set noautochdir"'
fi
# Yarn
a ytu='yarn test -u'
# Git
a quote="curl -s https://api.quotable.io/quotes/random | jq '.[].content,.[].author'"
a hh='yarn hardhat'
a gp='git push'
a gs='git stash save'
a gpr='git pull -r'
a gpot='git push origin && git push origin --tags'
a gca='git commit --amend --no-edit'
a gcommit='f() { git add -v ${1} && git commit --message="${2}" };f'
a grf='f() { git reset ${1} };f'
a gcommit-and-push='f() {git add -v ${1} && git commit --message="${2}" && git push};f'
a gmod='git fetch && git merge origin/develop'
a npm='pnpm'
a yarn='pnpm'
function fix-gitignore() {
git rm -r --cached .
git add .
git commit -m "fixed untracked files"
};
# Github
function clone-rep() {
cd ~/dev/cloned
git clone ${1}
repo=`echo ${1} | cut -d / -f 5`
cd ${repo}
}
function clone-rep-and-install() {
cd ~/dev/cloned && gcl ${1}
repo=`echo ${1} | cut -d / -f 5`
cd ${repo}
npm install
}
function update-children-repos() {
for dir in `ls`
do cd $dir
rebase=`git pull -r`
if [ $? -ne 0 ]; then
echo "error pulling $dir"
else
echo "$dir: $rebase"
fi
cd ..
done
}