forked from scrooloose/vimfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon-environment
86 lines (66 loc) · 2.2 KB
/
common-environment
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
#!/bin/sh
umask -S u=rwx,g=rwx,o=rx >/dev/null
#Specific shell variables.
if [ -e ${HOME}/.shell_vars ]; then
. ${HOME}/.shell_vars;
fi
#If brew install php55
if which brew >/dev/null 2>/dev/null && brew --prefix php55 >/dev/null 2>/dev/null; then
export PATH="$(brew --prefix php55)/bin:$PATH"
fi
if which go >/dev/null 2>/dev/null; then
export PATH="$HOME/go/bin:$PATH"
fi
#ruby envirnoment manager.
if [ -x ${HOME}/.rvm/scripts/rvm ]; then
source ${HOME}/.rvm/scripts/rvm
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
fi
#local bins to override search path
if [ -d $HOME/bin ]; then
export PATH=$HOME/bin:$PATH
fi
export IS_MAC="$( if uname -a | grep -qi darwin; then echo 'yes'; else echo 'no'; fi)"
alias grep="grep --color"
alias tmux="tmux -u2"
alias getcomposer="curl -sS https://getcomposer.org/installer | php"
set -o vi
export PAGER="less"
export VISUAL=vim
#Adds readline functionality to node REPL
if which node >/dev/null 2>/dev/null && which rlwrap >/dev/null 2>/dev/null; then
alias node='env NODE_NO_READLINE=1 rlwrap -p Green -S "node >>> " node'
fi
#if cpanm installed then source.
if [ -d ${HOME}/perl5/lib/perl5 ]; then
eval `perl -I ~/perl5/lib/perl5 -Mlocal::lib`
fi
#Color and fancy symols at end of file so i know what they are.
alias ls="ls -G -F";
alias opentcp="lsof -i TCP -c"
alias opentcpuser="lsof -u $(whoami) -a -i TCP"
alias ymd="date +'%Y-%m-%d %H:%M:%S'"
if which rbenv >/dev/null 2>/dev/null; then
eval "$(rbenv init -)"
fi
if [ "${IS_MAC}" = "yes" ]; then
#Usefull alias's
export LC_ALL="en_AU.UTF-8"
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
else
#if term is not 256 colors then force it god damn it! This is 2013
if ! echo $TERM | grep -q 256; then
export TERM=screen-256color
fi
fi
export GOPATH=$HOME/go
if which boot2docker >/dev/null ; then
$(boot2docker shellinit >/dev/null 2>/dev/null );
fi
alias esrun="docker run -d -p 9200:9200 -p 9300:9300 --volumes-from es dockerfile/elasticsearch /elasticsearch/bin/elasticsearch -Des.config=/data/elasticsearch.yml"
#Always last line, override system binaries
export PATH="/usr/local/bin:/usr/local/sbin:$PATH"
#Hack because there is 2 path variables ???? WTF?
PATH1="$PATH";
unset PATH;
PATH="$PATH1"