This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
mkdir -p /home/ec2-user/var | |
PID=$(cat /home/ec2-user/var/gitrepo.pid) | |
kill -9 $PID | |
git --work-tree=/home/ec2-user/git-repo checkout -f | |
cd /home/ec2-user/git-repo | |
[ -s "/home/ec2-user/.nvm/nvm.sh" ] && . "/home/ec2-user/.nvm/nvm.sh" # This loads nvm | |
nvm use 0.10.26 | |
nohup coffee app.coffee > /home/ec2-user/var/gitrepo.log 2>&1 & | |
echo $! > /home/ec2-user/var/gitrepo.pid |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install docker | |
sudo yum install -y docker; sudo service docker start | |
# install git | |
sudo yum install -y git | |
# remote git repo | |
(mkdir -p worktree/.git; cd worktree/.git; git init --bare;) | |
# install nvm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inject = (target,injected_modules) -> | |
fs = require 'fs' | |
coffeescript = require 'coffee-script' | |
index = (fs.readFileSync target).toString() | |
index = (index.split('\n').map (x) -> "\t#{x}").join('\n') | |
source = "(require) ->\n#{index}" | |
(coffeescript.eval source) (module) -> | |
injected_modules[module] or require module |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input { | |
# Sample input over UDP | |
udp { format => "json" port => 9999 type => "rlog_udp" } | |
redis { | |
host => "10.20.7.34" | |
data_type => "list" | |
key => "logstash" | |
codec => json | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function clean_up { | |
# Perform program exit housekeeping | |
rm $TEMP_FILE | |
exit | |
} | |
trap clean_up SIGHUP SIGINT SIGTERM | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ZooKeeper 3.4.5 | |
docker run -d -name zk -p 2181:2181 paulczar/zookeeper-3.4.5 /opt/zookeeper-3.4.5/bin/zkServer.sh start-foreground | |
# Mongodb | |
docker run -d -name mongo -p 27017 damien/mongodb mongod | |
# redis | |
docker run -d -name redis srid/redis:2.6 | |
# Enter your facebook or github app secret into db! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# public port | |
export WEBFRONTEND_PORT=6060 | |
export GATEWAY_PORT=6061 | |
export GIT_PORT=6062 | |
export LOCAL_IP=$(ip addr show | grep eth0 | grep inet | awk '{print $2}' | sed -e 's/\/.*$//') | |
# install jq | |
if [ "$(uname)" == "Darwin" ] | |
then | |
wget http://stedolan.github.io/jq/download/osx64/jq |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"default": { | |
"description" : "mainstream", | |
"repo": "http://rd-mtft.redduck.com/_cdn", | |
"game_list": "http://rd-mtft.redduck.com/_cdn/games", | |
"websocket": "ws://rd-mtft.redduck.com/gateway" | |
}, | |
"sbg" : { | |
"description" : "sbg(skyworker)", | |
"repo": "http://10.20.30.10/_cdn", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker images | grep '<none>' | awk '{print $3}' | xargs docker rmi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export GATEWAY_IP=$(ip addr | awk '/global/ {print $2}' | sed -e "s/\/.*//g") |