-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.samrc
30 lines (24 loc) · 1.16 KB
/
.samrc
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
USER_NAME="Sam Shih"
EDITOR=vim
source ~/.dev_env_rc
# Aliases
alias less='less -N'
alias datNetworkManager='sudo service network-manager restart'
alias datIBusRestart='ibus-daemon -rd'
## Git
alias datGitStats='git shortlog -sne --since=3.month'
alias datGitDelete='git ls-files -o --exclude-standard | xargs rm'
alias datGitTagClean='git log --tags --simplify-by-decoration --pretty="format:%d" | grep archived | tail -n10 | cut -c 7- | sed "s/)$//" | xargs git tag -d'
alias datGitPrune='git remote prune origin && git gc --prune --aggressive'
# Used for apple #alias datThunderboltGamma="xrandr --current --output DP1 --gamma 1.1:1.1:1.1 --brightness 1.02"
# example of function (see http://stackoverflow.com/a/30357877)
# but using redirect is better :)
# alias datGifGenerator='__f() { unset -f $0; echo "== params $1 $2"; ffmpeg -t 5 -i $1 -r 5 "$2"; }; __f'
alias datGifGenerator='cat <<< '\''ffmpeg -t 5 -i $1 -r 5 "$2"'\'' | source /dev/stdin'
# Powerline configuration
if [ -f /usr/share/powerline/bindings/bash/powerline.sh ]; then
powerline-daemon -q
POWERLINE_BASH_CONTINUATION=1
POWERLINE_BASH_SELECT=1
source /usr/share/powerline/bindings/bash/powerline.sh
fi