- three replica set members
- each member, bootstrapped with edelight/mongodb
- reads from secondaries
- iptables:
- enable communication between all three nodes in set
- allow connection from app server
- plan for sharding contingency
- spin up an identical three-member set
This file contains 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
for i in [1...100] | |
if i % 3 is 0 and i % 5 is 0 | |
console.log "fizzbuzz" | |
else if i % 3 is 0 | |
console.log "fizz" | |
else if i % 5 is 0 | |
console.log "buzz" | |
else | |
console.log i |
This file contains 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
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get install -y -f -m ruby1.9.1 ruby1.9.1-dev \ | |
rubygems1.9.1 \ | |
build-essential libopenssl-ruby1.9.1 libssl-dev zlib1g-dev \ | |
libxslt-dev libxml2-dev git | |
sudo gem install chef --no-rdoc --no-ri --version '< 11' |
This file contains 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
ssh <ip> | |
git clone <repo> | |
cd arima-deps-cookbook | |
bundle | |
berks install --path cookbooks/ | |
# edit config/solo.rb | |
# change cookbook_path to /home/deploy/arima-deps-cookbook/cookbooks | |
chef-solo -c config/solo.rb -j config/node.json |
---
layout: post
title: Exfiltrating Mario Kart Data from Google App Engine
tags: [code, kart]
---
In our most recent [Mario Kart][3] multiplayer session, there was a data error in which one round didn't save correctly. If this happens in [tetris][0] it is a non-issue as I just go into sql and correct it (normally user error). The data for Mario Kart however is stored in the Google App Engine datastore. This data is very cumbersome to query and update by comparison.
So in short I think it is time to get the data out of there. Something I've been dreading since this data mess-up happened, way back on Feb 17, 2013.
This file contains 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
useradd -b /home tom | |
mkdir /home/tom/.ssh | |
wget https://github.com/tphummel.keys && cat tphummel.keys > /home/tom/.ssh/authorized_keys | |
chown -R tom:tom /home/tom | |
chsh -s /bin/bash tom | |
# set default editor to vim | |
visudo | |
tom ALL=(ALL:ALL) NOPASSWD: ALL |
This file contains 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
var multilevel = require('multilevel'); | |
var net = require('net'); | |
var level = require('level'); | |
// root | |
// var db = level('data'); | |
// ebs piops 500 | |
// var db = level('/vol/data'); |
This file contains 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
python -V | |
# should be >= 2.6.x | |
# else | |
sudo apt-get install python2.6 | |
which pip | |
# else | |
sudo apt-get install python-pip | |
pip install flexget |
This file contains 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
<html> | |
<head> | |
<title>Demo</title> | |
</head> | |
<body> | |
<h3>Welcome to the demo</h3> | |
<ul class="things"> | |
<li>thing 1</li> | |
<li>thing 2</li> | |
<li>one final thing</li> |