Skip to content

Instantly share code, notes, and snippets.

View Aulos's full-sized avatar

Pawel Zubrycki Aulos

  • Growbots
  • Warsaw, Poland
View GitHub Profile
@paulirish
paulirish / bling.js
Last active May 1, 2024 19:56
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
var http = require('http'),
toobusy = require('toobusy');
console.log("Maximum allowed event loop lag: " + toobusy.maxLag(50) + "ms");
function processRequest(res, num, startTime) {
if (!startTime) startTime = new Date();
if (num === undefined) {
return process.nextTick(function() {