cam's notebooks

  • Untitled - /cam/123456
    Last edited 6 years ago
    var _ =require('underscore'), Q = require('q'); var x = _.map([1, 2, 3], function(item){ return Q(function(){ return item; }); });
  • Test of Node-RSS - /cam/node-rss-test
    Last edited 7 years ago
    var RSS = require('rss'), _ = require('underscore'), feed, feedOptions, xml; feedOptions = { title: "JW Broadcasting", description: "JW Broadcasting", feed_url: "http://mediator.jw.org/v1/rss", site_url: "http://tv.jw.org" }; feed = new RSS(feedOptions); _.each(['January', 'February', 'March'], function(month) { feed.item({ title: month + ' Broadcasting', description: 'With Brother [insert here].', url: 'tv.jw.org/#en/video/VODProgramsEvents/pub-jwbam_201510_3_VIDEO', date: month + ' 1, 2015' }); }); xml = feed.xml();