forked from henricavalcante/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.bashrc
More file actions
138 lines (110 loc) · 4.92 KB
/
.bashrc
File metadata and controls
138 lines (110 loc) · 4.92 KB
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
128
129
130
131
132
133
134
135
136
137
# Colors
export COLOR_NC='\e[0m' # No Color
export COLOR_WHITE='\e[1;37m'
export COLOR_BLACK='\e[0;30m'
export COLOR_BLUE='\e[0;34m'
export COLOR_LIGHT_BLUE='\e[1;34m'
export COLOR_GREEN='\e[0;32m'
export COLOR_LIGHT_GREEN='\e[1;32m'
export COLOR_CYAN='\e[0;36m'
export COLOR_LIGHT_CYAN='\e[1;36m'
export COLOR_RED='\e[0;31m'
export COLOR_LIGHT_RED='\e[1;31m'
export COLOR_PURPLE='\e[0;35m'
export COLOR_LIGHT_PURPLE='\e[1;35m'
export COLOR_BROWN='\e[0;33m'
export COLOR_YELLOW='\e[1;33m'
export COLOR_GRAY='\e[0;30m'
export COLOR_LIGHT_GRAY='\e[0;37m'
function git_branch () {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
function hg_branch () {
hg branch 2> /dev/null | awk '{print "(hg - " $1 ")"}'
}
export EVOLUXROOT=/var/sites/evolux
PS1='\[\033[01;35m\]\u\[\033[00m\]\[\033[00;35m\]@evolux\[\033[00m\]:\[\033[01;34m\]\w\[\e[0;33m\]$(git_branch)$(hg_branch)\n\[\e[0m\][\D{%H.%M.%S}] $ '
export EVOLUXNODEROOT=~/evolux-node
export edev="172.16.7.137"
alias edev-login="ssh root@$edev -p 2222"
alias run-tests="EVOLUX_TEST_INI='test_mysql.ini' nosetests --with-pylons='test_mysql.ini' -v -x $@"
alias ev="source /usr/local/pythonenv/evolux/bin/activate; cd $EVOLUXROOT"
alias evn="source ~/virtualenvs/evolux-node/bin/activate; cd $EVOLUXNODEROOT"
alias ls='ls --color -G'
alias ggrep='grep -nri --color --exclude-dir=".//.hg" --exclude-dir={.bzr,CVS,.git,.hg,.svn,node_modules,vendor,app_bundles} --exclude=*.{pyc,patch,orig,rej}'
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as aunction*
if [ -f ~/.local/lib/python2.7/site-packages/powerline/bindings/bash/powerline.sh ]; then
source ~/.local/lib/python2.7/site-packages/powerline/bindings/bash/powerline.sh
fi
export PATH=$PATH:/snap/bin
export PATH=$PATH:$HOME/.cargo/bin
alias run-tests-pg='sudo -u postgres dropdb evolux_teste; sudo -u postgres createdb evolux_teste -O evolux; EVOLUX_TEST_INI='\''test_psql.ini'\'' nosetests --with-pylons='\''test_psql.ini'\'' --rednose -v -x '
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
if [[ -S "$SSH_AUTH_SOCK" && ! -h "$SSH_AUTH_SOCK" ]]; then
ln -sf "$SSH_AUTH_SOCK" ~/.ssh/ssh_auth_sock;
fi
LS_COLORS='ow=01;36;40'
export LS_COLORS
export LC_TMPVIM=/tmp/sergio_vimrc
export LC_TMPTMUX=/tmp/sergio_tmux.conf
export LC_TMPBASH=/tmp/sergio_bash
function sssh() {
host=$1
scp -P2223 ~/.vimrc $host:$LC_TMPVIM
scp -P2223 ~/.tmux.conf $host:$LC_TMPTMUX
scp -P2223 ~/.bashrc $host:$LC_TMPBASH
ssh -o SendEnv=LC_TMPVIM $host -p2223
}
#TMUX ALIASES
alias tkill='tmux kill-session -t'
alias tls='tmux ls'
alias tmux='tmux -u'
eval `dircolors ~/dotfiles/dircolors-solarized/dircolors.256dark`
source $HOME/.asdf/asdf.sh
source $HOME/.asdf/completions/asdf.bash
source $HOME/.env
GOV=$(asdf where golang)
export GOROOT=$GOV/go
alias s2svpn="sudo openvpn --config sfilipe.conf"
export EDITOR='vim'
alias rmtun0="sudo route del -net 172.16.0.0 gw 172.16.17.1 netmask 255.255.224.0 dev tun0"
# IPMI Local Control
alias startpve1='ipmitool -I lanplus -H 172.16.6.121 -U ADMIN chassis power on'
alias startpve2='ipmitool -I lanplus -H 172.16.6.122 -U ADMIN chassis power on'
alias startpve5='ipmitool -I lanplus -H 172.16.6.125 -U ADMIN chassis power on'
alias restartpve1='ipmitool -I lanplus -H 172.16.6.121 -U ADMIN chassis power reset'
alias restartpve2='ipmitool -I lanplus -H 172.16.6.122 -U ADMIN chassis power reset'
alias restartpve5='ipmitool -I lanplus -H 172.16.6.125 -U ADMIN chassis power reset'
export ANSIBLE_VAULT_PASSWORD_FILE=~/.ansible-vault-file
alias ssh-nokey='ssh -o PubkeyAuthentication=no'
alias xcopy='xclip -selection c'
export PATH="/home/kalmik/.pyenv/bin:$PATH"
eval "$(direnv hook bash)"
alias power-tune='sudo powertop --auto-tune'
alias aws-internal='aws --profile "internal"'
alias aws-hightouch='aws --profile "hightouch"'
alias aws-multitenant='aws --profile "multitenant"'
alias aws-stfc='aws --profile "stfc"'
alias aws-tooke='aws --profile "tooke"'
#TOOKE ALIAS
alias tooke-psql="docker compose exec --user postgres tooke-db psql"
#aws-internal application-autoscaling describe-scheduled-actions --service-namespace ecs
function aws-assume-role() {
aws sts assume-role --role-arn arn:aws:iam::$1:role/AdminRole --serial-number arn:aws:iam::090953592940:mfa/sergio.filipe --token-code $2 --role-session-name=$1
}
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/sergiofilipe/miniconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/home/sergiofilipe/miniconda3/etc/profile.d/conda.sh" ]; then
. "/home/sergiofilipe/miniconda3/etc/profile.d/conda.sh"
else
export PATH="/home/sergiofilipe/miniconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<