This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
var oldSetTimeout = GLOBAL.setTimeout; | |
GLOBAL.setTimeout = function () { | |
var e = new Error('Just for stack trace'); | |
console.log('New timeout registered from %s', e.stack); | |
return oldSetTimeout.apply(this, arguments); | |
}; | |
var oldSetInterval = GLOBAL.setInterval; | |
GLOBAL.setInterval = function () { | |
var e = new Error('Just for stack trace'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Based on https://github.com/needforspeed/Nodejs-ARM-builder/blob/master/cross-compiler.sh | |
# but updated to use the cross-compiling tools that Raspberry Pi recommends for the kernel. | |
# Only works for ARMv6. | |
# AJJ: Released into the public domain. | |
set -e |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var secretKey = 'foo'; | |
setInterval(function () { | |
secretKey = secretKey + 'bar'; | |
console.log('My secret key is ' + secretKey); | |
}, 1000); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var log = (function () { | |
"use strict"; | |
var format = require('util').format; | |
// Customize levels, but do not name any level: "log" "getLevel" "setLevel" | |
var levels = { ERROR: 10, WARN: 20, INFO: 30, DEBUG: 40, TRACE: 50 }; | |
var currentLevel = 'INFO'; | |
function doGetLevel() { return currentLevel; } | |
function doSetLevel(level) { |
NewerOlder