forked from ambv/.dot_files
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprofile_common
123 lines (107 loc) · 3.63 KB
/
profile_common
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
#
# Common routines for startup.
#
# PLEASE NOTE: THIS FILE SHOULD BE KEPT
# COMPATIBLE WITH BOTH BASH 3+ AND ZSHELL 4.3.10+.
#
#
# my exports
#
export HOSTNAME="`hostname`"
export LC_ALL=pl_PL.UTF-8
export LANG=pl_PL.UTF-8
export LANGUAGE=pl_PL.UTF-8
export TZ="Europe/Warsaw"
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad
export LS_COLORS="no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:"
export LS_OPTIONS=--color=auto
export EDITOR=vim
export VIMFILES=~/.vim/
export PYTHONSTARTUP=~/.pythonstartup
export PIP_REQUIRE_VIRTUALENV=true
export PIP_RESPECT_VIRTUALENV=true
export PIP_DOWNLOAD_CACHE=~/.pip-cache
export VIRTUALENV_USE_DISTRIBUTE=true
LOCAL_BIN=~/.dot_files/bin
export PATH="$LOCAL_BIN:/opt/automation:$PATH"
#
# my aliases
#
# LANDSRAAD
alias landsraad="ssh -Yp26 ambv@193.33.35.200"
alias caladan="ssh -Yp26 ambv@193.33.35.201"
alias arrakis="ssh -Yp26 ambv@193.33.35.202"
alias giediprime="ssh -Yp26 ambv@193.33.35.203"
alias landsraad-tunnel-5900="ssh -Yp26 ambv@193.33.35.200 -L 5900:localhost:5900 -N"
alias landsraad-tunnel-5901="ssh -Yp26 ambv@193.33.35.200 -L 5901:localhost:5901 -N"
alias pogorzelisko="ssh czarny@195.110.48.39"
# ALLPLAY
alias allegra="ssh -Yp58881 root@ster-gaming.pl"
#alias allplay="ssh -Yp58022 ambv@allplay.pl"
alias allplay="ssh -Yp26 allplay@193.33.35.202"
# SAFE COMMANDS
alias rm="rm -i"
alias mv="mv -i"
alias cp="cp -ir"
alias ll="ls -lah"
alias lt="tree -AphL"
alias tree="tree -A"
alias vim="vim -XO" # if you want the default, just type vim -O1
alias vi="vim"
alias ci="echo \"You probably meant vi. Or are you still using RCS?\"; false"
alias dc="echo \"You don't really use 'dc', do you?\"; false"
alias grep="grep --color=auto"
alias git="SSH_AUTH_SOCK=0 git"
# shortcuts
alias :q='logout'
alias :qa='logout'
alias die='logout'
alias jloc='let "a = 0"; for num in `find . -iname "*.java" | xargs -I {} wc -l {} | cut -d. -f1 | tr -d " "`; do let "a = a + num"; done; echo $a;'
alias loc='let "a = 0"; for num in `find . -iname "*.py" | xargs -I {} wc -l {} | cut -d. -f1 | tr -d " "`; do let "a = a + num"; done; echo $a;'
alias todo-list="ack --column -w \"\\W(TODO|FIXME|REMEMBER|WEDNESDAY|XXX|BUG|WTF|OMF?G|pdb\\.set_trace)\\W{1}\""
alias depyc='find . -iname "*.pyc" -print -exec rm {} \; && find . -iname "*.orig" -print -exec rm {} \;'
# Django
alias djrun='python -Wd manage.py runserver'
alias djrs='python -Wd manage.py runserver'
alias djsync='python -Wd manage.py syncdb'
alias djevo='python -Wd manage.py evolve --hint'
alias djmm='python -Wd manage.py makemessages -ae html,txt'
alias djcm='python -Wd manage.py compilemessages'
alias djsh='python -Wd manage.py shell'
#
# my functions
#
function wintitle {
echo -ne "\033]0;$1\007"
}
function git_diff {
git diff --no-ext-diff "$@" | vim -R -
}
function dot_files_version {
CWD=`pwd`
cd ~/.dot_files
echo `git log --pretty=format:"%h: %ar" | head -n 1`
cd $CWD
}
function dot_files_update {
CWD=`pwd`
cd ~/.dot_files
git pull && ./install.py
cd $CWD
}
function pipcached {
pip install `find ~/.pip-cache/ -iname "*$@*" | grep -v content-type`
}
#
# execute machine-specific settings
#
if [ -e ~/.profile_machine ]; then
source ~/.profile_machine
fi
#
# execute local-specific settings
#
if [ -e ~/.profile_local ]; then
source ~/.profile_local
fi