This file contains 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
if (typeof module === 'object' && typeof module.exports === 'object') { | |
module.exports = createWhatever(); | |
} |
This file contains 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
find . -name [name of file] |
This file contains 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
// Combines every element in A with every element in B. | |
function crossArrays(arrayA, arrayB) { | |
var combo = []; | |
arrayA.forEach(function combineElementWithArrayB(aElement) { | |
arrayB.forEach(function combineBElementWithAElement(bElement) { | |
if (Array.isArray(aElement) || Array.isArray(bElement)) { | |
combo.push(aElement.concat(bElement)); | |
} | |
else { | |
combo.push([aElement, bElement]); |
This file contains 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
➜ ~ node 0 ~ | |
> function showGrandCaller() { console.log('grandcaller:', showGrandCaller.caller.caller); console.log('parent caller:', showGrandCaller.caller); } | |
undefined | |
> function innerCaller() { showGrandCaller(); } | |
undefined | |
> function outerCaller() { innerCaller(); } | |
undefined | |
> outerCaller(); | |
grandcaller: function outerCaller() { innerCaller(); } | |
parent caller: function innerCaller() { showGrandCaller(); } |
This file contains 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
{ | |
"created_at": "Sat Dec 20 20:31:52 +0000 2014", | |
"id": 546402627261833200, | |
"id_str": "546402627261833217", | |
"text": "RT @bxllshipper: in NY, an american larry shipper asked Harry if Larry was real. Harry winked at her and said \"you know\" http://t.co/6OFB4X…", | |
"source": "<a href=\"http://twitter.com/download/android\" rel=\"nofollow\">Twitter for Android</a>", | |
"truncated": false, | |
"in_reply_to_status_id": null, | |
"in_reply_to_status_id_str": null, | |
"in_reply_to_user_id": null, |
This file contains 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
{ | |
"START": { | |
"EH": 3794, | |
"L": 27491, | |
"M": 21337, | |
"SH": 7342, | |
"P": 13789, | |
"K": 25811, | |
"W": 7070, | |
"D": 18826, |
This file contains 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
+ | |
# | |
# | |
# | |
|* | |
# |
This file contains 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
{" ":"black","#":"#bbb","-":"#555","|":"#555","+":"#a83",".":"#efd","@":"#af6",">":"#5ad"} |
This file contains 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 originalLog = console.log; | |
console.log = function trapLog(param) { | |
if (param === undefined) { | |
debugger; | |
} | |
originalLog(arguments); | |
}; |