Skip to content

Instantly share code, notes, and snippets.

View AdrianRossouw's full-sized avatar

Adrian Rossouw AdrianRossouw

View GitHub Profile

Keybase proof

I hereby claim:

  • I am AdrianRossouw on github.
  • I am adrianrossouw (https://keybase.io/adrianrossouw) on keybase.
  • I have a public key whose fingerprint is F854 382B B86F 3665 C9FD BD95 2BBB 6DD7 2D16 BAA6

To claim this, I am signing this object:

@AdrianRossouw
AdrianRossouw / logstash.config
Last active August 29, 2015 14:14
logstash config
input {
tcp {
port => 5514
}
udp {
port => 5514
}
}
filter {
input {
tcp {
codec => json_lines {
charset => "UTF-8"
}
port => 3000
}
}
filter {
input {
tcp {
codec => json_lines {
charset => "UTF-8"
}
port => 3000
}
}
filter {
input {
tcp {
codec => json_lines {
charset => "UTF-8"
}
port => 3000
}
}
filter {
--- paths.js 2014-11-10 23:24:17.000000000 +0200
+++ paths.beta.js 2014-11-10 23:24:17.000000000 +0200
@@ -3,7 +3,7 @@
module.exports = [
{
match: /^\/ping$/,
- resource: 'http://route.wayfinder.is/ping',
+ resource: 'http://route-beta.wayfinder.is/ping',
handler: handlers.proxy,
},
@AdrianRossouw
AdrianRossouw / extension.diff
Last active August 29, 2015 14:08
diff between waldo and firefox extensions
diff -ur waldo-cfx/.git/config wf-cfx/.git/config
--- waldo-cfx/.git/config 2014-10-31 16:48:22.000000000 +0200
+++ wf-cfx/.git/config 2014-10-31 16:48:31.000000000 +0200
@@ -6,7 +6,7 @@
ignorecase = true
precomposeunicode = true
[remote "origin"]
- url = git@github.com:wayfin/waldo-cfx.git
+ url = git@github.com:wayfin/wf-cfx.git
fetch = +refs/heads/*:refs/remotes/origin/*
@AdrianRossouw
AdrianRossouw / debug.js
Created September 6, 2014 14:53
famous debug view - uses smoothie charts
var F = require('./famous');
var extend = require('./extend');
var AppState = require('./app-state');
var Smoothie = require('smoothie');
var colors = require('random-colors')(10);
module.exports = extend(F.View, {
constructor: function() {
F.View.apply(this, arguments);
@AdrianRossouw
AdrianRossouw / 00readme.md
Last active August 29, 2015 14:05
werewolves.io world timer model

This is the timer model I built for the werewolves.io project a few months ago.

The entire project was built on the back of state.js and backbone.

What was interesting about this timer model, and most of the werewolves project actually, is that it formed part of
a distributed state machine. The timer state changes were streamed over websockets to each of the clients, and when
the server manipulated the timer, it would propagate to all connected browser tabs.

I also needed to be able to serialize the state to be able to set the initial data for each new load, and I also
had to make some considerations towards eventually storing the active game in something like redis, to survive