Skip to content

Instantly share code, notes, and snippets.

@saich
saich / profiler.js
Created June 26, 2012 06:00
window.performance.now() wrapper for profiler use
/**
* @constructor
*/
function Profiler() {
}
/**
* Uses the best resolution timer that is currently available.
* The return value of this can only be used for measuring the time interval,
@saich
saich / urlrequest.js
Created December 6, 2011 13:42 — forked from wilsonpage/reqUrl.js
A wrapper module for 'http.request' function...
// Based upon https://gist.github.com/1393666
var querystring = require('querystring'),
url = require('url'),
http = require('http');
/**
* @param {string} reqUrl The complete URL to send the request to
* @param {Object} options options of the request
* @param {Function} cb Callback function that is to be called with response / errors