-
Notifications
You must be signed in to change notification settings - Fork 0
/
.aliases
36 lines (30 loc) · 1.3 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
31
32
33
34
35
alias cls='clear'
alias cl='cls; ls -hl'
alias cla='cl -a'
alias cp='cp -i'
alias mv='mv -i'
alias rm='rm -i'
alias lstodo='grep -Rn "TODO:"'
alias checkip='curl https://postman-echo.com/ip'
alias tmplay='_TMP_PLAYGROUND=$(date +%s) && mkdir "/tmp/playground-${_TMP_PLAYGROUND}" && cd "/tmp/playground-${_TMP_PLAYGROUND}" && unset _TMP_PLAYGROUND'
# hist_disable & hist_enable
alias hist_disable="function zshaddhistory() { return 1 }"
alias hist_enable="unset -f zshaddhistory"
# Aliases for Docker
alias dk='docker'
alias dkc='docker-compose'
# Aliases for SimpleHTTPServer
alias SimpleHTTPServerCaddy='which caddy > /dev/null && echo "Serving HTTP on port 8000..." && caddy file-server --browse --listen :8000 2> /dev/null'
alias SimpleHTTPServerDocker='docker info 2> /dev/null > /dev/null && echo "Serving HTTP on port 8000..." && docker run --rm -v $PWD:/usr/share/nginx/html:ro -p 8000:80 nginx:alpine'
alias SimpleHTTPServerPython2='python -m SimpleHTTPServer 2> /dev/null '
alias SimpleHTTPServerPython3='python -m http.server 2> /dev/null'
alias SimpleHTTPServer=SimpleHTTPServerCaddy
# Aliases for git
alias gs='git status'
alias gd='git diff'
alias glog='git log'
alias gl='git lg'
alias gb='git branch'
alias gba='git branch -a'
alias gbtmp='git branch tmp-`date +%s`'
alias gcotmp='git checkout -b tmp-`date +%s`'