-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bashrc
71 lines (53 loc) · 2.1 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
#PS1="\h:\[\033[01;34m\]\W\[\033[00m\] \u\$ "
PS1='\[\e[0;31m\]⚡\[\e[m\] \[\e[01;34m\]\W\[\e[m\] \u\$ '
#PS1='\[\033[01;32m\]\u\[\033[01;34m\]::\[\033[01;31m\]\h\[\033[00;34m\]{ \[\033[01;34m\]\w \[\033[00;34m\]}\[\033[01;32m\]->\[\033[00m\]'
#export PGDATA=/usr/local/var/postgres/
#export PGHOST=/tmp
export CLICOLOR=1
export LSCOLORS=Gxfxcxdxbxegedabagacad
fn() { find . -name $1 ; }
fni() { find . -iname $1 ; }
perl_critic() { lwp-request -m POST http://perlcritic.com/perl/critic.pl
< $1 ; }
fnp() { find . -name $1 -print ; }
fnip() { find . -iname $1 -print ; }
portkiller() { kill -9 `lsof -i TCP:"${1}" | grep LISTEN | awk '{print $2}'` ; }
# tree = log --graph --oneline --decorate --all
update_git_log() {
while :
do
clear
# git --no-pager log -$1 --graph --all
# --pretty=format:'%Cred%h%Creset-%C(yellow)%d%Creset %s'
# --abbrev-commit --date=relative
# git --no-pager log --graph --all
# --pretty=format:'%Cred%h%Creset-%C(yellow)%d%Creset %s'
# --abbrev-commit --date=relative
git tree
sleep 2
done
}
export VIRTUALENVWRAPPER_PYTHON="/usr/local/bin/python3"
# set where virutal environments will live
export WORKON_HOME=$HOME/.virtualenvs
# ensure all new environments are isolated from the site-packages directory
export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages'
# use the same directory for virtualenvs as virtualenvwrapper
export PIP_VIRTUALENV_BASE=$WORKON_HOME
# makes pip detect an active virtualenv and install to it
export PIP_RESPECT_VIRTUALENV=true
if [[ -r /usr/local/bin/virtualenvwrapper.sh ]]; then
source /usr/local/bin/virtualenvwrapper.sh
else
echo "WARNING: Can't find virtualenvwrapper.sh"
fi
# For autoenv
source /usr/local/opt/autoenv/activate.sh
# To reset bash shell
# source ~/perl5/perlbrew/etc/bashrc
# Restart Apache
restart_apache() { sudo apachectl restart ; }
create_localhost_site_simlink() { sudo ln -s ~/Sites/$1/ /Library/WebServer/Documents/$1 ; }
create_localhost_github_simlink() { sudo ln -s ~/Documents/Github/$1/ /Library/WebServer/Documents$1 ; }
# To convert .bin & .cue to .iso
# bchunk IN.bin IN.cue OUTFILE_NAME