-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaliases
More file actions
56 lines (43 loc) · 1.54 KB
/
aliases
File metadata and controls
56 lines (43 loc) · 1.54 KB
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
# colors
if [ "$TERM" != "dumb" ]; then
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
if [ "$(uname)" = "Darwin" ]; then
export LSCOLORS=dxfxcxdxbxegedabagacad
alias ls='ls -CG'
else
alias ls='ls --color=auto -C'
fi
fi
if [ "$(uname)" = "Darwin" ]; then
alias flushdns='dscacheutil -flushcache;sudo killall -HUP mDNSResponder && echo DNS flushed'
alias byobu='BYOBU_PYTHON=`which python3` byobu'
fi
# docker related
if [ -f "$(which docker)" ]; then
# Kill all running containers.
alias dockerkillall='docker kill $(docker ps -q)'
# Delete all stopped containers.
alias dockercleanc='printf "\n>>> Deleting stopped containers\n\n" && docker rm $(docker ps -a -q)'
# Delete all untagged images.
alias dockercleani='printf "\n>>> Deleting untagged images\n\n" && docker rmi $(docker images -q -f dangling=true)'
# Delete all stopped containers and untagged images.
alias dockerclean='dockercleanc || true && dockercleani'
if [ "$(uname)" = "Darwin" ]; then
# Start docker on Mac
alias dockermachine='eval $(docker-machine env)'
fi
# killing docker desktop
function kdo() {
ps ax|grep -i docker|egrep -iv 'grep|com.docker.vmnetd'|awk '{print $1}'|xargs kill
}
fi
# git related
alias gitwork='git config user.email ivan.pan@thermofisher.com'
alias gitpersonal='git config user.email me@ivanpan.com'
# python
alias python="python3"
# vi/vim/nvim
[ -f "$(which vim)" ] && alias vi=$(which vim)
[ -f "$(which nvim)" ] && alias vim=$(which nvim)