-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bashrc
90 lines (70 loc) · 2.42 KB
/
.bashrc
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
echo "# ~/.bashrc"
export EDITOR=/usr/bin/vim
export GREP_OPTIONS='--color=auto'
export LESS_IS_MORE=1
alias pg='ping www.google.com'
# -- BASH
alias macs='cat ~/.bashrc'
alias brc='mvim ~/.bashrc'
alias sbrc='source ~/.bashrc'
# -- VIM
alias m='mvim'
alias vimrc='mvim ~/.vimrc'
# -- SYSTEM
alias ..='cd ..'
alias l='ls -l1GF'
alias lx='ls -lGF'
alias la='ls -laGF'
alias lad='ls -lGF | sort -k1 -r'
alias tree='tree -C'
alias xgrep='grep -iIR --exclude-dir={tmp,log,public,minified,.git,.circleci,node_modules,vendor} --exclude={\*.min.*,\*.svg}'
alias oxgrep=xgrepOpen
alias xfind="find . -name $1"
alias oxfind=findOpen
function xgrepOpen() {
mvim $(xgrep -l $1 $2)
}
function findOpen() {
mvim $(find . -name $1)
}
mkcd() {
case "$1" in /*) :;; *) set -- "./$1";; esac
mkdir -p "$1" && cd "$1"
}
cl() { cd "$@" && la; }
# -- DIRS
alias ~='cd ~'
alias dev='cd ~/dev'
alias dt='cd ~/Desktop'
# -- NOTES
alias doit='open /Volumes/GoogleDrive/My\ Drive/notes/_doit.txt'
alias ideas='open /Volumes/GoogleDrive/My\ Drive/notes/_ideas.txt'
alias notes='open /Volumes/GoogleDrive/My\ Drive/notes/_notes.txt'
alias thoughts='open /Volumes/GoogleDrive/My\ Drive/notes/_thoughts.txt'
alias liv='open /Volumes/GoogleDrive/My\ Drive/living'
alias tb='open https://tidbits-tln.firebaseapp.com/'
## -- GIT
alias gp='git pull'
alias gps='git push'
alias gd='git diff'
alias gs='git status'
alias gsp='git status --porcelain'
alias gss='git status --short'
alias gl='git log'
alias gls='git log --stat'
alias gl1="git log --pretty=format:'%C(yellow)%h %C(reset)%s %C(green)<%an>%Creset' --date=short"
alias gl2="git log --pretty=format:'%C(yellow)%h %C(magenta)%ad %Creset%s %C(green)<%an>%Creset' --date=short"
alias gl3="git log --graph --pretty=format:'%C(yellow)%h% %C(yellow)%d%Creset %s %C(magenta)%ad %C(green)<%an>%Creset' --date=short"
alias ge=gitOpen
function gitOpen() {
mvim `git status --porcelain | sed -ne 's/^ M //p'`
}
## -- LOCAL DEVOPS
alias spg="pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start"
export PGDATA=/usr/local/var/postgres
alias sms="mysql.server start"
alias ar="sudo apachectl restart"
## -- MAC OS SPECIFIC
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 cap='screencapture -T5 -c'