-
Notifications
You must be signed in to change notification settings - Fork 1
/
bashrc
83 lines (64 loc) · 1.6 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
# -----
# Env
set -o vi
# basics
export EDITOR='nvim'
export LANG='en_US.UTF-8'
export HISTSIZE=10000
export SAVEHIST=10000
export HISTFILE="$HOME/.histfile"
# -----
# Aliases
export CDPATH=".:$HOME/projects:$HOME/projects/instant"
#!/usr/bin/env bash
# general
alias l='ls -lahG'
alias psimple="python -m SimpleHTTPServer"
# python
alias jp="jupyter"
alias jpn="jp notebook"
# vim
alias vi="vim"
alias vim="nvim"
# git
alias g='git status'
alias gst='git status'
alias gf='git fetch'
alias gm='git merge'
alias ga='git add'
alias gb='git branch'
alias gc='git commit'
alias gck='git checkout'
alias gd='git diff'
alias gca='git commit -a'
alias gcaa='git commit -a --amend -C HEAD'
alias gg='git grep'
alias glo='git log'
alias gl='git pull'
alias gp='git push'
alias lg="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%ad>%Creset' --abbrev-commit --date=short"
alias ghu="git push heroku master"
alias gx="echo 'yolo' && git add -A && git commit --amend --no-edit && git push -f"
function gpm() {
ga -A && gc -m "$*" && gp
}
function gh-publish() {
git checkout -B gh-pages
git add -f build
git commit -am "Rebuild website"
git filter-branch -f --prune-empty --subdirectory-filter build
git push -f origin gh-pages
git checkout -
}
function ssid () {
/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | \
awk '/ SSID/ {print substr($0, index($0, $2))}'
}
function pass () {
security find-generic-password -gwa "$1"
}
function wifipass () {
pass "$(ssid)"
}
. ~/.bash_profile
. ~/dotfiles/local