Skip to content

Instantly share code, notes, and snippets.

@benwong
benwong / event.video.youtube.js
Created September 28, 2012 07:22
YouTube iFrame API wrapper for event videos
var EventYouTubeVideo = (function(){
var module = {};
module.init = function(){
var tag = document.createElement('script');
tag.src = "http://www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
};
@RandomEtc
RandomEtc / csv2html.js
Created February 11, 2012 19:06
Quick node.js script to convert a CSV file to HTML
// first of all make sure we have enough arguments (exit if not)
if (process.argv.length != 5)
{
console.error("Usage: node csv2html.js input.csv template.ejs output.html")
console.error();
console.error("Outputs the given template for each row in the given input.")
console.error("Uses the first row of the CSV as column names in the template.")
process.exit(1);
}