-
Notifications
You must be signed in to change notification settings - Fork 0
/
localrc
executable file
·55 lines (41 loc) · 1.41 KB
/
localrc
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
# Local ###
export PATH=bin:$PATH
export PATH=$HOME/.rbenv/bin:$PATH
# Local installs
export EDITOR=code
# Java support
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
alias ttop='/usr/bin/top -ocpu -R -s 2 -n30'
alias vless='vim -R -T builtin_ansi -u /usr/share/vim/vim62/macros/less.vim'
alias p='ping google.com'
alias vim='mvim -v'
alias less="less -R"
alias be='bundle exec'
alias t='be bin/testrb'
alias rtags='ctags -R --languages=ruby --exclude=.git'
alias cpptags='ctags -R --languages=cpp --exclude=.git'
# git shortcuts
alias gb='for k in `git branch|sed "s/^..//"`;do echo -e `git log -1 --pretty=format:"%Cgreen%ci %Cblue%cr%Creset" "$k" --`\\t"$k";done|sort'
alias gl="git log --pretty=oneline --graph --all"
alias gdb='git branch --merged | grep -v "\*" | grep -v master | xargs git branch -d'
alias gpl="git pl"
alias gpu="git pu"
alias gfm="git fm"
alias gd="git diff"
alias gs="git status"
alias gre="git reset --hard HEAD"
alias gcb="git checkout -b $1"
alias gap="git add --patch"
alias gc="git commit -m $1"
function l2 { mdfind "kMDItemDisplayName == '$@'wc"; }
# Git
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
# 'find' shortcuts
alias findsmall='find . -size -1000000c'
# Ruby Version Manager
[[ -s $HOME/.rvm/scripts/rvm ]] && source $HOME/.rvm/scripts/rvm
# Project shortucts
alias ghid="cd ~/github/id"
alias github="cd ~/github/github"