/
.aliases
88 lines (76 loc) · 2.28 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
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
# Ruby
alias irb='irb --readline -r irb/completion -rubygems'
# Rails
alias rdbm='rake db:migrate'
alias bx="bundle exec"
alias bxg="bx guard"
alias rc="rails console"
alias rct="rails console test"
# Elixir
alias watch="mix test.watch"
alias stale="mix test.watch --stale"
alias wip="mix test.watch --only wip"
alias wips="mix test.watch --stale --only wip"
# Docker
alias dock="docker-compose"
# System
alias dfup='cd ~/Workspace/dotfiles && git pull && sh bin/setup.sh'
alias dir='ls -al'
alias home='cd ~/'
alias fuck='sudo $(history -p \!\!)'
alias ep='slime ~/.bash_profile'
alias rp='. ~/.bash_profile'
alias hosts='slime ~/.ssh/config'
# ALIASES
# Path
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."
alias ......="cd ../../../../.."
# # Shell
alias vi='vim'
alias la="ls -alFGgohq"
# fancy ls command
# -l long format
# -F / after dirs, * after exe, @ after symlink
# -G colorize
# -g suppress owner
# -o suppress group
# -h humanize sizes
# -q print nongraphic chars as question marks
# Tmux
alias tml='tmux ls'
alias tmn='tmux new -s'
alias tma='tmux attach -t'
alias tmk='tmux kill-session -t'
# Git
alias gap='git add -p'
alias ga='git add'
alias gnap='git add -N . && git add -p'
alias gb='git branch'
alias gc='git commit -v'
alias git-ham='git commit -m "H.A.M." && git push -f'
alias gd='git diff --color-words'
alias glod='git log --graph --pretty="%Cgreen%h%Creset%Cblue%d%Creset %Cred%an%Creset: %s"'
alias gp='git push'
alias gpr='git pull --rebase'
alias gst='git status'
alias grc='git rebase --continue'
alias gri='git rebase --interactive'
alias gra='git rebase --abort'
alias gcm="git commit -m"
alias gca="git commit --amend --no-edit"
alias gco="git checkout"
alias glog="git log --pretty=oneline"
alias gh='git config --get remote.origin.url | ruby -ne "puts %{https://github.com/#{\$_.split(/.com[\:\/]/)[-1].gsub(%{.git},%{})}}"| xargs open'
alias commit_count="git shortlog -n -s --no-merges"
alias gpush='git push origin master'
alias gpull='git pull origin master'
alias gco='git checkout'
alias gstat='git status'
alias gcam='git commit -a -m'
alias glog='git log'
alias gitclean='git checkout master && git branch --merged master | grep -v "\* master" | xargs -n 1 git branch -d'
# Bash
alias hg="history | grep"