Skip to content

Instantly share code, notes, and snippets.

View venkatramachandran's full-sized avatar
😎

Venkat Ramachandran venkatramachandran

😎
View GitHub Profile
@Tomalak
Tomalak / isNodeList.js
Last active February 24, 2021 20:36
A function to test if a JavaScript object is a DOM NodeList. This is designed to work across all browser implementations. StackOverflow question reference http://stackoverflow.com/a/7238344/18771.
/* 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));
}
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active May 6, 2024 02:17
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

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!






\

@leklund
leklund / 1 - nginx.conf.erb
Created June 27, 2013 15:27
simple conf for a static site on heroku using nginx with this buildpack: https://github.com/neilmiddleton/heroku-buildpack-nginx. File structure: app/conf/nginx.conf.erb app/conf/mime.types app/html/index.html
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" '
@mheadd
mheadd / outbound-node.js
Created December 10, 2010 19:13
A simple Node.js script to send SMS messages through the Tropo platform.
/**
* 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
*