Skip to content

Instantly share code, notes, and snippets.

View brianleroux's full-sized avatar
💚
You are now aware that you are breathing

Brian LeRoux brianleroux

💚
You are now aware that you are breathing
View GitHub Profile
3 == "03" // true!
(true + 1) === 2;​ ​// true
(true + true) === 2; // true
true === 2; // false
true === 1; // false
var a = 8;
var someFunc = function(){
document.write(a);
var a = 8;
};
someFunc(); // writes a as undefined
3 > 2 > 1 // false
a = 012 // 10
"0" && {} // true
0 && {} // false, ok...fair enough
0 == "0" // true, wtf!
window.window == window // true
window.window === window // false
window == document // true. wtf!
window.recurse = function(times)
{
if (times !== 0)
recurse(times - 1);
}
recurse(13); // stack overlfow at: 0
Number.MAX_VALUE*1.0000000000000001 === (1/0) // false
Number.MAX_VALUE*1.0000000000000002 === (1/0) // true
Here's an example of how I was able to use the rsp from Smart.app to run on a different
port at the same time. It would be nice if this ability was built into the GUI app, but
for now, I hacked it.
I made a directory for my app here:
/Users/jim/joyent/rsp/local-smartasks
I put the application source in a subdirectory called '127.0.0.1'. So the bootstrap.js is
at /Users/jim/joyent/rsp/local-smartasks/127.0.0.1/js/bootstrap.js