-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.aliases
30 lines (22 loc) · 1.05 KB
/
.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
alias rls=". /home/$USER/.zshrc && tmux source-file /home/$USER/.tmux.conf || true"
# ASCII characters
alias ascii="awk 'BEGIN{for(i=32;i<127;i++)printf \"%c\",i; print}'"
# AWS usable ASCII characters (do not include ''', '"', ' ', '@', '\', '/' )
alias asciiaws="awk 'BEGIN{for(i=32;i<127;i++)printf \"%c\",i; print}'|sed 's%[ @\"'\'']%%g'"
# Generate random AWS usable password, default 16 characters
randpwaws(){ < /dev/urandom tr -dc $(asciiaws) | head -c${1:-16};echo;}
# Generate random password
randpwnormal(){ < /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-16};echo;}
# Format python code
alias fopy="autopep8 --in-place --recursive --recursive ."
### Git ###
alias gdnew="for next in \$( git ls-files --others --exclude-standard ) ; do git --no-pager diff --no-index /dev/null \$next; done;"
alias gdn="git --no-pager diff; gdnew"
alias gfp="git push origin HEAD -f"
alias amen="git commit --amend --no-edit"
alias fpush="git add . && amen && gfp"
alias gpp="git push origin HEAD"
rok() {
echo "Running Ngrok at port ${1:-3000}"
# Your Ngrok stuff
}