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
# 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"; | |
} |
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
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) |
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
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 |
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
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); |
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
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); |
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
# This is the code that generated the javascript (above) | |
numClients = 200 | |
fdbLib = require('fdb').apiVersion 100 | |
livedb = require './lib' |
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
// 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); |
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
### 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: |
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
<!DOCTYPE html> | |
<title>Cool game</title> | |
<style> | |
.centerbox { | |
/* flexbox, por favor */ | |
display: flex; | |
align-items: center; | |
justify-content: center; | |
width: 100%; |
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
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 |