Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@ export RUBY_SCRIPT_PATH=~/ruby
# export P4DONTCHECKIN=$(p4 -P $P4TICKET changes -u i819885 -s pending -c gsecil-linux-main | grep DO-NOT-CHECK-IN | cut -d' ' -f 2)
#fi

export http_proxy=http://proxy:8080
export https_proxy=$http_proxy
export no_proxy=localhost
#export http_proxy=http://proxy:8080
#export https_proxy=$http_proxy
#export no_proxy=localhost
export GIT_SSL_NO_VERIFY=true

#alias t='tail -f $PWD/log/development.log'
#alias irb=~/bin/irb
#alias rake='jruby -S rake'
#alias gem='jruby -S gem'
#alias T='jruby -J-Xmx1300m -J-XX:MaxPermSize=256m -I $RUBY_SCRIPT_PATH -rfast_fail_runner test/all_tests.rb -v --runner=fastfail'
#alias ls='ls --color'
alias T='jruby -J-Xmx1300m -J-XX:MaxPermSize=256m -I $RUBY_SCRIPT_PATH -rfast_fail_runner test/all_tests.rb -v --runner=fastfail'
alias ls='ls -G'

PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
26 changes: 0 additions & 26 deletions bin/edit

This file was deleted.

28 changes: 28 additions & 0 deletions bin/fio-test
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/sh
#
#

dir=$(dirname $0)

for h in $(cat /tmp/hosts)
do
echo '========================'
echo $h
ssh cubetree@$h hostname
echo '========================'
scp $dir/runfio cubetree@$h:.
ssh cubetree@$h grep file_store /proc/mounts
ssh cubetree@$h mkdir -p /data/file_store/test
ssh cubetree@$h ./runfio /data/file_store/test 2>&1 > /dev/null
ssh cubetree@$h cat fio.out
echo '---------------------------------------'
echo /tmp
ssh cubetree@$h ./runfio /tmp 2>&1 > /dev/null
ssh cubetree@$h cat fio.out
echo '---------------------------------------'
echo dd throughput
ssh cubetree@$h 'dd if=/dev/zero of=/data/file_store/test/ddtest count=256k 2>&1'
echo '---------------------------------------'
ssh cubetree@$h rm -r /data/file_store/test
done

8 changes: 4 additions & 4 deletions bin/git_svn_branch_checkout
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
#!/bin/bash -x
#!/bin/bash
#

SVNREPO_BASE=https://robleslabs.svn.cvsdude.com/ct
SVNREPO_BASE=$(git svn info | grep 'Repository Root:' | sed 's/Repository Root: //')

svn_remote() {
echo "[svn-remote \"svn-$1\"]
url = https://robleslabs.svn.cvsdude.com/ct/branches/$1
url = $SVNREPO_BASE/branches/$1
fetch = :refs/remotes/svn-$1
" >> .git/config

}

usage() {
echo "Usage:
git_svn_branch_checkout [SVN branch]
$(basename $0) [SVN branch]
"
exit 1
}
Expand Down
20 changes: 20 additions & 0 deletions bin/runfio
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh
#

sudo apt-get -y -q install fio 2>&1 > /dev/null
cat - <<EOF > /tmp/random.fio
; random read of 128mb of data

[random-read]
;numjobs=5
rw=randread
size=128m
;directory=/data/file_store/test
;directory=/mnt/test
;directory=/tmp
directory=$1

EOF
fio /tmp/random.fio 2>&1 | tee fio.out
sudo apt-get -y -q purge fio libaio1 2>&1 > /dev/null

Binary file added bin/websocketd
Binary file not shown.
1 change: 1 addition & 0 deletions gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
config/deploy.rb filter=rcs-keyword
19 changes: 19 additions & 0 deletions gitconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[user]
name = Secillano, George
email = george.secillano@gmail.com
[core]
excludesfile = /Users/i819885/.gitignore_global
attributesfile = /Users/i819885/.gitattributes
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[mergetool "sourcetree"]
cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
[http]
;proxy = proxy:8080
[filter "rcs-keyword"]
clean = perl -pe \"s/\\\\\\$HeadURL[^\\\\\\$]*\\\\\\$/\\\\\\$HeadURL\\\\\\$/\"
smudge = "perl -pe \"s/\\\\\\$HeadURL[^\\\\\\$]*\\\\\\$/\\\\\\$Head`git svn info | grep URL | sed \"s#/#\\\\\\\\\\/#g\"`\\\\/\\\\\\$/\""
[init]
templatedir = ~/.gittemplates
12 changes: 12 additions & 0 deletions gittemplates/hooks/post-checkout
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
#

lock=/tmp/post-checkout.lock
if [ -f $lock ]
then
rm /tmp/post-checkout.lock
else
touch $lock
rm config/deploy.rb
git checkout config/deploy.rb
fi
23 changes: 17 additions & 6 deletions lighttpd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
server.port = 80

#server.document-root = "/home/george/dev/constellation/whohar/public"
server.document-root = "/home/george/projects/cubetree/public"
server.document-root = "/Users/i819885/jam/ct/public"
server.modules = (
"mod_proxy"
)
Expand Down Expand Up @@ -32,16 +32,27 @@ $HTTP["url"] =~ "^/cometd" {

proxy.server = ( "" =>
( (
"host" => "127.0.0.1",
"port" => "3000"
"host" => "10.8.70.30",
"port" => "80"
),
(
"host" => "127.0.0.1",
"port" => "3002"
"host" => "10.8.70.31",
"port" => "80"
) )
)

#proxy.server = ( "" =>
#( (
#"host" => "127.0.0.1",
#"port" => "3000"
#),
#(
#"host" => "127.0.0.1",
#"port" => "3002"
#) )
#)

$SERVER["socket"] == ":443" {
ssl.engine = "enable"
ssl.pemfile = "/etc/lighttpd/server.pem"
ssl.pemfile = "server.pem"
}
58 changes: 58 additions & 0 deletions ssh_config
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,61 @@ Host github.com
PreferredAuthentications publickey
Hostname ssh.github.com
Port 443

Host vanl00479590a
User george

# DC2 jumphost
Host 10.2.30.70
User I819885

# DC4 jumphost
Host 10.4.196.175
User I819885

# DC8 jumphost
Host 10.8.196.50
User I819885

# DC10 jumphost
Host 10.10.198.30
User I819885

# DC2 devops host
Host 10.2.70.20
User devops
#ProxyCommand ssh 10.2.30.70 netcat %h %p
ProxyCommand ssh 10.4.196.175 netcat %h %p

# DC4 devops host
Host 10.4.70.21
User devops
ProxyCommand ssh 10.4.196.175 netcat %h %p

# DC8 devops host
Host 10.8.70.20
User devops
ProxyCommand ssh 10.8.196.50 netcat %h %p

# DC10 devops host
Host 10.10.70.20
User devops
ProxyCommand ssh 10.10.198.30 netcat %h %p

# DC12 devops host
Host 10.118.70.55
User devops
ProxyCommand ssh 10.4.70.21 netcat %h %p

Host 10.100.* 10.10.* 10.4.* 10.5.* 10.8.* 10.2.* 10.12.*
User cubetree

#Host ci.cubetree.com
#User root
#IdentityFile Documents/ec2-stage.pem

Host 10.0.0.*
User cubetree
ProxyCommand ssh cubetree@54.236.134.49 nc %h %p


101 changes: 96 additions & 5 deletions zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ ZSH=$HOME/.oh-my-zsh
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
#ZSH_THEME="agnoster"
ZSH_THEME="robbyrussell"
#ZSH_THEME=$(cat ~/.zsh-theme)

Expand All @@ -30,7 +31,7 @@ ZSH_THEME="robbyrussell"
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
plugins=(cap git gem bundler rails ruby autojump zeus)
plugins=(cap git gem bundler rails autojump zeus rvm gitflow)

source $ZSH/oh-my-zsh.sh
source $HOME/.bashrc
Expand All @@ -49,14 +50,15 @@ alias stopdebian='vmrun stop /vmware/debian/debian.vmx nogui 2>&1 > /dev/null'
ctrepo() {
echo 'https://robleslabs.svn.cvsdude.com/ct'
}
sp(){
setproxy(){
export http_proxy=http://proxy:8080
export https_proxy=$http_proxy
export ftp_proxy=$http_proxy
sed -i.bak 's/#http-proxy-host/http-proxy-host/' ~/.subversion/servers
sed -i.bak 's/#http-proxy-port/http-proxy-port/' ~/.subversion/servers
sed -i.bak 's/;proxy/proxy/' ~/.gitconfig
}
up() {
unsetproxy() {
unset http_proxy
unset https_proxy
sed -i.bak 's/^http-proxy-host/#http-proxy-host/' ~/.subversion/servers
Expand All @@ -68,8 +70,97 @@ up() {
alias ls='ls -G'

PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
alias vpn='ikec -a -r SF-ALL-ADMIN -u i819885 -p'
PATH=/usr/local/bin:/usr/local/sbin:$PATH

# VPN management. Requires Shrewsoft VPN client
vpn() {
case "$1" in
"check")
sudo nmap -PN -sU -p 500 12.178.105.137
;;
"stop")
killall ikec > /dev/null 2>&1 || echo 'VPN client not running'
;;
"")
# status
RETVAL=0
ifconfig | grep -A3 tap0: || { echo "VPN is disconnected" && RETVAL=1 }
[ $RETVAL -eq 0 ]
;;
*)
vpn && { echo "VPN is active. Doing nothing" && return }
vpn stop
nohup ikec -a -r SF-ALL-ADMIN -u i819885 -p "$1" < /dev/null > ~/tmp/ikec.log 2>&1 &
while true; do
vpn && break
sleep 1;
done
;;
esac
}

#ping proxy 2>& > /dev/null && sp
ping -c 1 proxy > /dev/null 2>&1 && sp
dc() {
IP=$1
DCNUM="$(echo $IP | cut -d. -f2)"
case $DCNUM in
2)
GW=10.2.70.20
;;
4)
GW=10.4.70.21
;;
8)
GW=10.8.70.20
;;
10)
GW=10.10.70.20
;;
118)
GW=10.118.70.55
;;
*)
echo "Unsupported DC"
return 1
;;
esac

CMD="ssh $GW -t"
if [ ${#IP} -gt 3 ]
then
CMD="$CMD \"scp .georgerc cubetree@$IP:/tmp/.; ssh -t cubetree@$IP bash --init-file /tmp/.georgerc\""
else
CMD="$CMD bash --init-file .georgerc"
fi
bash -c "$CMD"
}

nodes() {
grep -i "$1" config/deploy/instances/$2.rb | grep -o "10\..*" | sed -e "s/['\",]//g" | sort | uniq
}

ctapp() {
nodes "ctapp" $1
}

ctutil() {
nodes "ctutil\|ctcron" $1
}

s() {
HOST=$1
ssh -t cubetree@$HOST.sapjam.com bash --init-file .georgerc
}

alias vi='/usr/local/bin/vim'
alias vim='/usr/local/bin/vim'
alias log2='dc 10.2.72.11'
alias log4='dc 10.4.72.10'
alias sdlog4='dc 10.4.72.90'
alias log8='dc 10.8.72.15'
alias sdlog8='dc 10.8.70.41'
alias log10='dc 10.10.72.11'
alias log12='dc 10.118.70.53'

### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"