-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbash_profile
More file actions
83 lines (63 loc) · 2.64 KB
/
Copy pathbash_profile
File metadata and controls
83 lines (63 loc) · 2.64 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
export GROOVY_HOME=/Users/cbrown/jar/groovy-sdk-2.1.0
export PATH=$PATH:$GROOVY_HOME/bin
export GRAILS_HOME=/Users/cbrown/dev/grails-2.3.7/
export PATH=$PATH:$GRAILS_HOME/bin
export GRADLE_HOME=/Users/cbrown/dev/gradle-1.2/
export PATH=$PATH:$GRADLE_HOME/bin
export JAVA_HOME=`/usr/libexec/java_home`
export PATH=$JAVA_HOME/bin:$PATH
# Setup Amazon EC2 Command-Line Tools
export EC2_HOME=~/.ec2
export PATH=$PATH:$EC2_HOME/bin
export EC2_PRIVATE_KEY=$EC2_HOME/pk-GIWOVJ6HYQ7OIIWPQ3RY4OKT2FHTF64F.pem
export EC2_CERT=$EC2_HOME/cert-GIWOVJ6HYQ7OIIWPQ3RY4OKT2FHTF64F.pem
# spike1 AWS
alias spike1-start-mc='ec2-start-instances i-15656074'
alias spike1-stop-mc='ec2-stop-instances i-15656074'
spike1-which() {
echo `ec2-describe-instances | awk '/^INSTANCE/ {print $4}'`
}
spike1-ssh() {
ssh -o "StrictHostKeyChecking no" -i ~/.ec2/spike1-cbrown.pem ubuntu@`ec2-describe-instances | awk '/^INSTANCE/ {print $4}'`
}
spike1-stop-server() {
ec2-stop-instances `ec2-describe-instances -F "tag:role=server" | awk '/^INSTANCE/ {print $2}'`
}
spike1-start-server() {
ec2-start-instances `ec2-describe-instances -F "tag:role=server" | awk '/^INSTANCE/ {print $2}'`
ec2-associate-address 23.21.244.108 -i i-43611927
}
spike1-ssh-server() {
ssh -o "StrictHostKeyChecking no" -i ~/.ec2/spike1-cbrown.pem ubuntu@`ec2-describe-instances -F "tag:role=server" | awk '/^INSTANCE/ {print $4}'`
}
spike1-scp-server() {
scp -o "StrictHostKeyChecking no" -i ~/.ec2/spike1-cbrown.pem $1 ubuntu@`ec2-describe-instances -F "tag:role=server" | awk '/^INSTANCE/ {print $4}'`:/tmp
}
abspath () { case "$1" in /*)printf "%s\n" "$1";; *)printf "%s\n" "$PWD/$1";; esac; }
###
# http://www.sallyroth.us/?p=73
label() {
echo -e "\033];$1\007"
}
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
# http://apple.stackexchange.com/questions/12993/why-doesnt-bashrc-run-automatically#comment13715_13019
source ~/.bashrc
export PS1="\! \W $ "
export HISTSIZE=1000000
export HISTFILESIZE=1000000
export HISTCONTROL=ignoreboth
export HISTTIMEFORMAT='%F %T '
case "$TERM" in
xterm*|rxvt*)
DISP='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"'
BASHLOG='/Users/cbrown/.bash_history.log'
SAVEBASH='if [ "$(id -u)" -ne 0 ]; then echo "`date +"%Y-%m-%d %H:%M:%S"` `pwd` `history 1`" >> ${BASHLOG}; fi'
PROMPT_COMMAND="${PROMPT_COMMAND}${DISP};${SAVEBASH}"
;;
*)
;;
esac
alias git-iu="git status -s | grep ^?? | awk '{print $2}' >> ~/.gitignore_global"
source /usr/local//bin/virtualenvwrapper.sh
alias mint="cd /Users/cbrown/dev/mint-exporter && foreman run ruby mint-exporter.rb && ruby munge.rb"
alias hist='history | grep'