Skip to content

Instantly share code, notes, and snippets.

Avatar

Julien Gilli misterdjules

View GitHub Profile
View casper.js sammy.js
casper.test.begin "Login with Sammy.js routing", 4, (test) ->
casper.start someHost
casper.then ->
test.assertExists "form#login-form", "Index page must have a register form."
# This is needed so that your frontend code can do whatever it needs
# to do (like loading models) when initializing your single page app.
# Going to the next step without the initialization completed can make it look
# like issues happen in the next steps for other reasons.
this.wait 1000, ->
@misterdjules
misterdjules / gist:a06d55d2eb3e3fe74fa7
Created Jul 31, 2014
Example of dns.lookupService test
View gist:a06d55d2eb3e3fe74fa7
TEST(function test_lookupservice_ip_ipv4(done) {
var req = dns.lookupService('127.0.0.1', 80, function(err, host, service) {
if (err) throw err;
assert.strictEqual(host, 'localhost');
assert.strictEqual(service, 'http');
done();
});
checkWrap(req);
View gist:5ef3b7c5b0a7334a6e09
var timers = require('timers');
myInternalTimeout = function(callback, after) {
var timer = {};
timers.enroll(timer, after);
timers._unrefActive(timer);
timer._onTimeout = callback;
@misterdjules
misterdjules / gist:eb984bf0728b61cc8f28
Created Aug 7, 2014
.\Release\node test\internet\dns.js results on Windows 7
View gist:eb984bf0728b61cc8f28
jgilli@WIN-ALJGJOCA0KD ~/dev/node (fix-test-dns-services)
$ Release/node.exe test/internet/test-dns.js
test_resolve4
looking up nodejs.org...
test_resolve6
nodejs.org = [ '165.225.133.150' ]
test_reverse_ipv4
test_reverse_ipv6
test_reverse_bogus
test_resolveMx
View gist:e614aacfa6d83a3a6230
6.703038 1 port_getn - 1 events
6.703042 1 PORT_SOURCE_FD 0 fdevents 0x10
6.703068 1 port_associate 0 0x01
6.703074 1 port_getn - 1 events
6.703079 1 PORT_SOURCE_FD 0 fdevents 0x10
6.703102 1 port_associate 0 0x01
6.703109 1 port_getn - 1 events
6.703113 1 PORT_SOURCE_FD 0 fdevents 0x10
6.703137 1 port_associate 0 0x01
6.703143 1 port_getn - 1 events
@misterdjules
misterdjules / gist:23d9b9d1eebfa5f7421e
Last active Aug 29, 2015
Proposed blog post to coordinate v0.12 testing efforts
View gist:23d9b9d1eebfa5f7421e

Node.js 0.12 is near, and we need your help to make it happen!

The state of Node.js 0.12

The v0.12 branch has been created recently and we're currently focused on making it as rock solid as possible before we can release it as the 0.12.0 version that we've all been looking forward to. There are currently 32 open issues that need to be fixed before the release. Some of them will be triaged to other milestones in

@misterdjules
misterdjules / gist:f0762630d5be139ab1ae
Created Aug 20, 2014
make native fails on MacOS X in deps/v8 for v0.10
View gist:f0762630d5be139ab1ae
~/dev/node/deps/v8$ make native
CXX(target) /Users/JulienGilli/dev/node/deps/v8/out/native/obj.target/preparser_lib/src/cached-powers.o
../src/cached-powers.cc:136:18: error: unused variable 'kCachedPowersLength' [-Werror,-Wunused-const-variable]
static const int kCachedPowersLength = ARRAY_SIZE(kCachedPowers);
^
1 error generated.
make[1]: *** [/Users/JulienGilli/dev/node/deps/v8/out/native/obj.target/preparser_lib/src/cached-powers.o] Error 1
make: *** [native] Error 2
~/dev/node/deps/v8$
@misterdjules
misterdjules / gist:d79f0697e4d67eb6490c
Last active Aug 29, 2015
SmartOS http-flamegraph.sh results
View gist:d79f0697e4d67eb6490c

10ms Sampling

Original SmartOS v0.10:

Requests per second:    7891.09 [#/sec] (mean)
Requests per second:    8132.92 [#/sec] (mean)
Requests per second:    8346.65 [#/sec] (mean)
Requests per second:    7982.74 [#/sec] (mean)
Requests per second:    8133.56 [#/sec] (mean)
@misterdjules
misterdjules / gist:acff96777e611858abc7
Created Aug 22, 2014
joyent/node:#8160 benchmark script
View gist:acff96777e611858abc7
#!/bin/bash
#set -x
NODE=${NODE:-node}
NODE_DIR=$(dirname ${NODE})
D8_SRC=${D8_SRC:-./deps/v8}
# order of source files matters
D8_PROFILER_JS_SRC=(./deps/v8/tools/splaytree.js \
@misterdjules
misterdjules / SmartOS http-flamegraph-results.md
Last active Dec 21, 2015
joyent/node:#8160 benchmark for SmartOS and Linux
View SmartOS http-flamegraph-results.md

10ms Sampling

Original SmartOS v0.10:

Requests per second:    7891.09 [#/sec] (mean)
Requests per second:    8132.92 [#/sec] (mean)
Requests per second:    8346.65 [#/sec] (mean)
Requests per second:    7982.74 [#/sec] (mean)
Requests per second:    8133.56 [#/sec] (mean)
You can’t perform that action at this time.