-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy path.bash_profile
127 lines (104 loc) · 3.2 KB
/
.bash_profile
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
source ~/.profile
# common alias
alias sr.='source ~/.bash_profile'
alias pd='pwd'
alias hy='history'
alias ll='ls -la'
alias cdd='cd ~/Desktop'
alias workon='pyenv activate'
# git alias
alias gs='git status --short'
alias gss='git status'
alias ga='git add'
alias gal='git add -A'
alias gb='git branch'
alias gr='git-recent'
alias gc='git commit'
alias gca='git commit --amend'
alias gp='git push'
alias gpf='git push -f'
alias gpu='git push -u origin HEAD'
alias gpl='git pull'
alias gplr='git pull --rebase'
alias gd='git diff'
alias gco='git checkout'
alias gu='git undo'
alias gl='git log --oneline --graph --decorate -10 $*'
alias gll='git log --oneline --graph --decorate $*'
alias gml='git log --oneline --graph --all --decorate -10 $*'
alias grb='git rebase'
alias grc='git rebase --continue'
alias grs='git rebase --skip'
alias grh='git reset --hard'
alias gst='git stash --save'
alias gstp='git stash pop'
alias gstl='git stash list'
gst-apply() {
git stash apply stash@{$1}
}
gst-drop() {
git stash drop stash@{$1}
}
# npm
alias npm-lsg='npm list -g --depth 0'
# hackellstack
# alias sb='stack build --fast --file-watch'
# stack new with params
# sn() {
# stack new $1 ~/.stack/templates/empty.hsfiles -p 'path:rsschool-fp'
# }
# js
alias fixmd='prettier --write $(find . -name "*.md" ! -path "*node_modules*")'
alias parceldev='node ~/projects/drapegnik/parcel/packages/core/parcel/lib/cli.js'
# the fuck config
eval $(thefuck --alias)
# Shortcut function for creating custom git.io links.
# gitlink https://github.com/Drapegnik jsx
# See https://blog.github.com/2011-11-10-git-io-github-url-shortener
gitlink() {
# The first argument is the URL to shorten
VALUES="-F \"url=$1\""
# If a custom short code was requested, set the form value.
if [ -n "$2" ]; then VALUES="$VALUES -F \"code=$2\""; fi
# Send the request to GitHub and grab the Location header.
RESPONSE=$(eval "curl -i https://git.io $VALUES 2>&1" | grep Location)
# Remove the header name and echo only the generated short link.
echo "${RESPONSE//Location: /}"
}
# bash-completion
if [ -f $(brew --prefix)/etc/bash_completion ]; then
. $(brew --prefix)/etc/bash_completion
fi
# exercism bash-completion
# if [ -f ~/.config/exercism/exercism_completion.bash ]; then
# . ~/.config/exercism/exercism_completion.bash
# fi
# bash vars
export HISTTIMEFORMAT='%d/%m/%y %T -> '
# cli prefix format
GIT_PS1_SHOWDIRTYSTATE=true
export PS1='[\u@mbp \w$(__git_ps1)]\$ '
# nvm
export NVM_DIR=~/.nvm # don't forget mkdir ~/.nvm
source $(brew --prefix nvm)/nvm.sh
[[ -r $NVM_DIR/bash_completion ]] && . $NVM_DIR/bash_completion
# node
export NODE_ENV=development
# haskell stack packages
# export PATH=$PATH:~/.local/bin
# custom scripts
export PATH=$PATH:~/bin
# flutter
export PATH=$PATH:~/projects/dev/flutter/bin
# golang
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
# virtualenvwrapper
# export VIRTUALENVWRAPPER_PYTHON=/usr/local/Cellar/python3/3.7.2_2/Frameworks/Python.framework/Versions/3.7/bin/python3
# export WORKON_HOME=~/workspace/python/envs/
# source /usr/local/bin/virtualenvwrapper.sh
# # pyenv
# eval "$(pyenv init -)"
# # # auto-activation of virtualenvs
# eval "$(pyenv virtualenv-init -)"
# source $(pyenv root)/completions/pyenv.bash