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
faye = require 'faye' | |
client = new faye.Client 'http://josephgentle.com:4321/bayeux' | |
client.subscribe '/msg', (message) -> | |
console.timeEnd message | |
.callback -> | |
console.log 'Connected!' | |
seq = 0 |
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
connect = -> | |
clientio = require 'socket.io-client' | |
client = clientio.connect 'http://localhost:8999' | |
client.on 'connect', -> | |
console.warn 'Connected' | |
setInterval -> | |
console.time 'message' | |
client.send 'hi' |
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
connect = require 'connect' | |
request = require 'request' | |
connect( | |
connect.logger() | |
connect.static __dirname | |
).listen 3000, -> | |
request "http://localhost:3000/c.coffee", (err, resp, body) -> | |
console.warn err.stack if err |
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
$ coffee cc.coffee | |
Error: socket hang up | |
at createHangUpError (http.js:1083:15) | |
at Socket.<anonymous> (http.js:1166:27) | |
at Socket.emit (events.js:88:20) | |
at Array.0 (net.js:280:10) | |
at EventEmitter._tickCallback (node.js:194:26) |
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
Statistical profiling result from /Users/josephg/src/chipmunkjs/v8.log, (6853 ticks, 46 unaccounted, 0 excluded). | |
[Unknown]: | |
ticks total nonlib name | |
46 0.7% | |
[Shared libraries]: | |
ticks total nonlib name | |
[JavaScript]: |
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
[marking exports.Vect 0x1b70ac6a3de8 for recompilation] | |
[optimizing: exports.Vect / 1b70ac6a3de9 - took 0.623 ms] | |
[marking mymin 0x3ebe7f51e08 for recompilation] | |
[optimizing: mymin / 3ebe7f51e09 - took 0.141 ms] | |
[marking exports.collideShapes 0x1b70ac6a68c8 for recompilation] | |
[optimizing: exports.collideShapes / 1b70ac6a68c9 - took 0.335 ms] | |
[marking Arbiter.applyImpulse 0x1b70ac6a67f0 for recompilation] | |
[optimizing: Arbiter.applyImpulse / 1b70ac6a67f1 - took 3.078 ms] | |
[marking apply_impulse 0x109a8cf2d358 for recompilation] | |
[optimizing: apply_impulse / 109a8cf2d359 - took 0.285 ms] |
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
void runBenchmarks(void){ | |
for(int i = 0; i < bench_count; i++){ | |
{ | |
int i = 16; | |
ChipmunkDemo bench = bench_list[i]; | |
printf("%s\n", bench.name); | |
fflush(stdout); | |
bench.initFunc(); | |
CFAbsoluteTime start = CFAbsoluteTimeGetCurrent(); |
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
Given a contenteditable div containing this html: | |
<p>a paragraph with some <b>bold text</b> and <i>italics text</i></p> | |
I copy+pasted a duplicate of the 'h' character at the end of 'paragraph'. This is the mutation records: | |
Got 35 mutation record(s) | |
added text node with 'a paragraphh' | |
changed text from 'a paragraph with some ' to ' with some ' | |
added element <p></p> |
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
sephsmac:~ josephg$ git clone https://github.com/slembcke/Chipmunk-Physics.git | |
Cloning into 'Chipmunk-Physics'... | |
remote: Counting objects: 5761, done. | |
remote: Compressing objects: 100% (1382/1382), done. | |
remote: Total 5761 (delta 4350), reused 5479 (delta 4089) | |
Receiving objects: 100% (5761/5761), 1.19 MiB | 153 KiB/s, done. | |
Resolving deltas: 100% (4350/4350), done. | |
sephsmac:~ josephg$ cd Chipmunk-Physics/xcode | |
sephsmac:xcode josephg$ xcodebuild | |
=== BUILD NATIVE TARGET ChipmunkStatic OF PROJECT Chipmunk6 WITH THE DEFAULT CONFIGURATION (Release) === |
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
#include "stdafx.h" | |
#include "SDL.h" | |
#include "SDL_video.h" | |
enum Ingredients | |
{ | |
CARROT = 1, | |
CHEDDAR = 2, | |
CAPSICUM = 4, | |
FETTA = 8, |