Skip to content

Instantly share code, notes, and snippets.

@bontscho
bontscho / benchmark.js
Created May 22, 2018 21:47
benchmark for pixelmatch
const fs = require('fs');
const path = require('path');
const Benchmark = require('benchmark');
const suite = new Benchmark.Suite;
const PNG = require('pngjs').PNG,
matchAfter = require('./'),
matchBefore = require('./index.1.js');
const img1 = readImage(process.argv[2]);
const img2 = readImage(process.argv[3]);
@bontscho
bontscho / benchmark.js
Created May 22, 2018 21:47
benchmark for pixelmatch
const fs = require('fs');
const path = require('path');
const Benchmark = require('benchmark');
const suite = new Benchmark.Suite;
const PNG = require('pngjs').PNG,
matchAfter = require('./'),
matchBefore = require('./index.1.js');
const img1 = readImage(process.argv[2]);
const img2 = readImage(process.argv[3]);
@bontscho
bontscho / friends.js
Last active August 29, 2015 14:02
POC node-steam joinChat with promise
/* lib/handlers/friends.js */
var Steam = require('../steam_client');
var SteamID = require('../steamID');
// install q with "npm install q"
var Q = require('q');
var EMsg = Steam.EMsg;
var schema = Steam.Internal;