-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bash_aliases
94 lines (84 loc) · 2.59 KB
/
.bash_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
#Whats in an name/alias?
# Mac Specific aliases
alias vmstat=vm_stat
alias htop='sudo htop'
alias tcptraceroute='sudo tcptraceroute'
alias cow='fortune | cowsay'
alias f='open -a Finder ./' # Open a particular file using Finder
alias disablenap='defaults write NSGlobalDomain NSAppSleepDisabled -bool YES'
alias enablenap='defaults delete NSGlobalDomain NSAppSleepDisabled'
alias purge='sudo purge'
alias showFiles='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app'
alias hideFiles='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app'
alias dnsflush='sudo discoveryutil mdnsflushcache'
# Navigate to directories used often
alias xvt='cd ~/git/affinipay/virtual_terminal'
alias xgate='cd ~/git/affinipay/gateway'
# Quick kill statements
alias psj='ps aux | grep java'
alias docker-up='eval $(docker-machine env default)'
# Handy command aliases
alias mvn='mvn -DsuppressOutputOnFailure=true'
alias br='. ~/.bash_profile ; . ~/.bash_aliases' # easily reload .bash_profile
alias unzipall="echo 'One moment please...'; unzip -q '*.zip'"
alias unzipq='unzip -q'
alias ping='ping -c 3'
alias fastping='ping -c 100 -s .2'
alias df='df -h'
alias du='du -ch'
alias mv='mv -i'
alias cp='cp -i'
alias ls='ls -hG'
alias ll='ls -alchG'
#alias lf='ls -lt --full-time'
alias l.='ls -d .*'
alias l='ls'
alias llall='ls -R'
alias c=clear
alias ..='cd ..'
alias ...='cd ../../'
alias ....='cd ../../../'
alias .....='cd ../../../'
alias cd...='cd ../../../'
alias cd....='cd ../../../../'
alias .3='cd ../../..'
alias .4='cd ../../../..'
alias .5='cd ../../../../..'
alias .6='cd ../../../../../..'
alias mkdir='mkdir -pv'
alias wget='wget -c'
alias tailf='tail -f'
alias diff='colordiff'
alias grep='grep --color'
alias fgrep='fgrep --color'
alias findhere='find . -iname'
alias finddirectory='find . -type d -iname'
alias findfile='find . -type f -iname'
alias findlargefiles='du -S . | sort -rh | head -25'
alias encode='base64 <<<'
alias decode='base64 -d <<<'
alias prettyjson='echo $1 | jq .'
# Quick vim alias
alias v=vim
alias vi=vim
alias svi='sudo vi'
alias edit='vim'
alias frep=grep
# Common mistypes
alias pc=cp
alias bim=vim
alias vmi=vim
alias vin=vim
alias eexit=exit
# Adds coloring to man pages
man() {
env \
LESS_TERMCAP_mb=$(printf "\e[1;31m") \
LESS_TERMCAP_md=$(printf "\e[1;31m") \
LESS_TERMCAP_me=$(printf "\e[0m") \
LESS_TERMCAP_se=$(printf "\e[0m") \
LESS_TERMCAP_so=$(printf "\e[1;44;33m") \
LESS_TERMCAP_ue=$(printf "\e[0m") \
LESS_TERMCAP_us=$(printf "\e[1;32m") \
man "$@"
}