I hereby claim:
- I am MatthaeusHarris on github.
- I am matthaeus (https://keybase.io/matthaeus) on keybase.
- I have a public key whose fingerprint is 5CA4 F9D3 FD31 452C 4586 F29D 6302 355C DC4F BDBA
To claim this, I am signing this object:
#!/usr/bin/env ruby | |
# Tweakable knobs | |
# Which statuses constitute a success? | |
acceptable_statuses = ["200", "404", "403"] | |
# How much past history do we consider for each run, in seconds? | |
history = 60 |
Assuming a log file of entries like: | |
============================================================ | |
user_id = SIEZYTIEROGHEC4BCXYU9A | |
request_id = 5c119b8a-73f5-4e98-86ce-f6755c60d256 | |
operation = GET | |
request_timestamp = 1402072887926 | |
key = path/to/my/object | |
response = 200 | |
bytes = 34591 |
var eventAccumulator = function(event, eventsList, queue, callback) { | |
// logger.log("arena","eventAccumulator(%s,%s,%s,callback)",event, JSON.stringify(eventsList), JSON.stringify(queue)); | |
logger.log("arena","eventAccumulator queue: " + queue + " event: " + event); | |
if (typeof eventAccumulator[queue] === 'undefined' || typeof eventAccumulator[queue].eventList === 'undefined') { | |
eventAccumulator[queue] = {}; | |
eventAccumulator[queue].eventList = []; | |
for (var i in eventsList) { | |
eventAccumulator[queue].eventList.push(eventsList[i]) | |
} | |
} |
// Set up the event accumulator to fire when all users have been saved. | |
var arenaStartEvents = []; | |
for (var p in this.players) { | |
arenaStartEvents.push(this.players[p].userID); | |
this.players[p].on('leaveArena', (function(arena, player) { | |
return (function() { | |
arena.playerLeftArenaInProgress(player); | |
}); | |
})(this, this.players[p])); | |
} |
I hereby claim:
To claim this, I am signing this object:
var LCD = {}; | |
LCD.connect = function(/*=SPI*/_spi, /*=PIN*/_dc, /*=PIN*/_ce, /*=PIN*/_rst, callback) { | |
var LCD = Graphics.createArrayBuffer(84,48,1,{vertical_byte:true}); | |
var spi = _spi; | |
var dc = _dc; | |
var ce = _ce; | |
var rst = _rst; | |
setTimeout(function() { | |
digitalWrite(dc,0); // cmd | |
digitalPulse(rst, 0, 10); // pulse reset low |
var a = function(b) { | |
return function(c) { | |
return b*c; | |
} | |
} |
var makeLogger = function(level) { | |
return function(message) { | |
console.log(level + ": " + message); | |
} | |
} | |
var warn = makeLogger('warn'); | |
var err = makeLogger('err'); | |
var info = makeLogger('info'); |
{ | |
"webhosts": { | |
"example.com": { | |
"aliases": ["www.example.com"], | |
"docroot": "/var/www/example.com", | |
"ports": [80,443] | |
}, | |
"foo.example.com": { | |
"aliases": ["www.foo.example.com"], | |
"docroot": "/var/www/foo.example.com", |
#!/bin/bash | |
for f in $(find jpm/cloud0/ -type f) | |
do | |
if [ -e `echo $f | sed 's/^jpm\/cloud0/jpm\/cloud1/'` ] | |
then | |
#echo "Testing $f" >&2 | |
diff $f `echo $f | sed 's/^jpm\/cloud0/jpm\/cloud1/'` | |
fi | |
done |