Skip to content

Instantly share code, notes, and snippets.

# This is a basic VCL configuration file for varnish. See the vcl(7)
# man page for details on VCL syntax and semantics.
#
# Default backend definition. Set this to point to your content
# server.
#
backend default {
.host = "127.0.0.1";
.port = "8080";
}
14:02 * josephg reads up
14:03 < josephg> koppor, rawtaz: ShareJS does all the actual OT
14:03 < josephg> racer is now a wrapper around it which does things like refs, reflists
14:03 < josephg> ... it manages subscriptions for you (so if you change pages, you don't have to manually unsubscribe)
14:03 < josephg> stuff like that.
14:03 < josephg> ShareJS just does the document editing.
14:04 < josephg> Redis is currently important for 3 things:
14:05 < josephg> - We need to be able to atomically append to the op log. We're using redis's lua scripting to do atomic commits
14:05 < josephg> - Redis is also used for pubsub between your backend servers
14:05 < josephg> (well, between your servers)
export=['_main']
a.out.js: test.c src/*.c src/constraints/*.c Demo/Bench.c
emcc -O2 -DNDEBUG $^ -Iinclude/chipmunk -s EXPORTED_FUNCTIONS="${export}"
a.out: test.c src/*.c src/constraints/*.c Demo/Bench.c
clang -O2 -DNDEBUG $^ -Iinclude/chipmunk
function chipmunk(global, foreign, heap) {
"use asm";
var sqrt = global.Math.sqrt;
var sin = global.Math.sin;
var cos = global.Math.cos;
var atan2 = global.Math.atan2;
var u8 = new global.Uint8Array(heap);
var i8 = new global.Int8Array(heap);
@josephg
josephg / gist:6180806
Created August 8, 2013 01:56
light compilation for asmjs
function chipmunk(global, foreign, heap) {
"use asm";
var sqrt = global.Math.sqrt;
var sin = global.Math.sin;
var cos = global.Math.cos;
var atan2 = global.Math.atan2;
var u8 = new global.Uint8Array(heap);
var i8 = new global.Int8Array(heap);
@josephg
josephg / crash.coffee
Last active January 4, 2016 18:09
Foundationdb node crash
# This is the code that generated the javascript (above)
numClients = 200
fdbLib = require('fdb').apiVersion 100
livedb = require './lib'
// This version calls the _write callback after the data is sent.
Duplex = require('stream').Duplex;
var BCSocket = function(...) {
Duplex.call(this, {objectMode: true});
this.buffer = [];
};
BCSession.prototype = Object.create(Duplex.prototype);
@josephg
josephg / gist:9594765
Last active September 20, 2017 04:23
keybase.md
### Keybase proof
I hereby claim:
* I am josephg on github.
* I am josephg (https://keybase.io/josephg) on keybase.
* I have a public key ASCaIpIqWz62NQLOzRE5xaOtPYlsbrJzM1z8T4Fg54qUBgo
To claim this, I am signing this object:
<!DOCTYPE html>
<title>Cool game</title>
<style>
.centerbox {
/* flexbox, por favor */
display: flex;
align-items: center;
justify-content: center;
width: 100%;
assert = require 'assert'
_a = 'a'.charCodeAt(0)
_f = 'f'.charCodeAt(0)
_A = 'A'.charCodeAt(0)
_F = 'F'.charCodeAt(0)
hexForChar = (c, pos = 0) ->
ascii = c.charCodeAt pos
switch