Skip to content

Instantly share code, notes, and snippets.

View tphummel's full-sized avatar

Tom Hummel tphummel

View GitHub Profile
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
@tphummel
tphummel / gist:5855039
Last active December 18, 2015 22:29
bootstrap.sh
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'
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
@tphummel
tphummel / mongodb-production.md
Last active December 19, 2015 08:19
mongodb production env

mongodb production spec

  • 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
---
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.

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
@tphummel
tphummel / index.js
Last active December 21, 2015 20:09
multilevel test server
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');
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
<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>
@tphummel
tphummel / metroid3.md
Last active December 29, 2015 05:09
Metroid 3 100% Completion Guide

Metroid 3 100% Completion List

  • space station
  • down to morph ball
  • right. Under metroid 1 floor. m:5
  • back up. bomb + torizo
  • fake wall left. long downhill. et:1
  • left. down to Brinstar. bottom. right. up. Sporespawn
  • fall. sm:5. down. m:10. under. charge beam
  • right. dormant tube. wall kick. m:15