-
Notifications
You must be signed in to change notification settings - Fork 1
/
aliases
68 lines (57 loc) · 1.87 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
# Dir
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
alias p='pwd'
# Python
alias pweb='python -m SimpleHTTPServer'
# Android
alias l=pidcat
alias logcat=pidcat
alias adb_record="adb shell screenrecord /sdcard/recording.mp4 && adb pull /sdcard/recording.mp4 ~/Desktop/recording.mp4"
alias adb_screencap="adb shell screencap -p /sdcard/screen.png && adb pull /sdcard/screen.png ~/Desktop/screen.png"
# Hub
alias git=hub
# Git
alias g='git'
alias gut='git'
alias gaa='git add --all'
alias gl='git pull --prune'
alias glog="git log --graph --pretty=format:'%Cred%h%Creset %an: %s - %Creset %C(yellow)%d%Creset %Cgreen(%cr)%Creset' --abbrev-commit --date=relative"
alias gp=push_and_set_upstream
alias gd='git diff'
alias gcp='git cherry-pick'
alias gc='git commit'
alias gca='git add --all && git commit -a'
alias gco='git checkout'
alias gb='git branch'
alias gs='git status -sb' # upgrade your git if -sb breaks for you. it's fun.
alias gaa='git add --all && gs'
alias gf='git fetch --prune'
alias gr='gf && ga && git stash && git pull --rebase && git stash apply'
alias gup='git remote update -p; git merge --ff-only @{u}'
alias ghis='git for-each-ref --count=20 --sort=-committerdate refs/heads/ --format="%(refname:short)"'
alias gu='git fetch && git rebase --autostash'
alias pr=pull_request
# Brew
alias bu='brew upgrade && brew update --all && brew cleanup && brew doctor && brew prune'
alias bcu='brew cask doctor && brew cleanup'
# Mainframer
alias m="mainframer"
# Open
alias o='open .'
function pull_request() {
push_and_set_upstream
hub pull-request -o -m $1
}
# Pushes the current branch and sets it to upstream
function push_and_set_upstream() {
git push -u origin "$(git branch | grep '\*' | cut -d ' ' -f 2)"
}
function make-mp4() {
ffmpeg -f gif -i $1 $1.mp4
}
function make-gif() {
ffmpeg -i $1 -vf fps=10,scale=480:-1 $1.gif
}