I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
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
/* Released under the MIT License in 2014. http://opensource.org/licenses/mit-license */ | |
function isNodeList(nodes) { | |
var stringRepr = Object.prototype.toString.call(nodes); | |
return typeof nodes === 'object' && | |
/^\[object (HTMLCollection|NodeList|Object)\]$/.test(stringRepr) && | |
nodes.hasOwnProperty('length') && | |
(nodes.length === 0 || (typeof nodes[0] === "object" && nodes[0].nodeType > 0)); | |
} |
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
worker_processes 4; | |
daemon off; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' | |
'$status $body_bytes_sent "$http_referer" ' |
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
/** | |
* Simple outbound message launcher in Node.js | |
* | |
* You will need to have a Tropo scripting aplication set up | |
* to use this. See sample code below: | |
* | |
* message(msg, { to:number, network:"SMS" }); | |
* | |
* Save this file in your Tropo account as message.js | |
* |