Skip to content

Instantly share code, notes, and snippets.

View NicolasPelletier's full-sized avatar

Nicolas Pelletier NicolasPelletier

  • Autodesk Inc.
  • Montréal, Canada
View GitHub Profile
@NicolasPelletier
NicolasPelletier / npm-debug.log
Created April 22, 2016 14:36
Demonstrate failure to find the 'eslint' executable in ./node_modules/.bin when the source folder has %2f in its name.
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'run',
1 verbose cli 'test',
1 verbose cli '--verbose' ]
2 info using npm@2.15.0
3 info using node@v0.12.13
4 verbose run-script [ 'pretest', 'test', 'posttest' ]
5 info pretest GHTest1@1.0.0
@NicolasPelletier
NicolasPelletier / mapReduceTest.js
Created September 10, 2013 17:57
This test demonstrate a problem with mapReduce in mongodb 1.3.19.
/*jslint indent: 4, node: true, nomen:true, maxlen: 125*/
/*global emit */
'use strict';
var DATABASE_URL = 'mongodb://127.0.0.1:27017,127.0.0.1:27018,127.0.0.1:27019/dbName?replicaSet=rs0',
mongodb = require('mongodb'),
assert = require('assert'),
dbConnectConfig = {db: { w: 1 }};
mongodb.Db.connect(DATABASE_URL, dbConnectConfig, function (err, db) {
@NicolasPelletier
NicolasPelletier / testLoggerSpeed.js
Created February 12, 2013 22:01
This is a test to evaluate the speed of log4js compared to a straight write into a file stream.
/*jslint node: true, maxlen: 100 */
'use strict';
var fs = require('fs'),
log4js = require('log4js'),
async = require('async'),
NB_ITERATION = 150000;
function fileStreamSpeedTest(callback) {