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
%===================================================================== | |
% jhwhw.cls | |
% Provide jhwhw.cls class | |
%===================================================================== | |
%===================================================================== | |
% Identification | |
%===================================================================== | |
\NeedsTeXFormat{LaTeX2e} | |
\ProvidesClass{homework}[2015/02/11 Homework Class] |
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
// pre-render d3 charts at server side | |
var d3 = require('d3') | |
, jsdom = require('jsdom') | |
, fs = require('fs') | |
, htmlStub = '<html><head></head><body><div id="dataviz-container"></div><script src="js/d3.v3.min.js"></script></body></html>' | |
jsdom.env({ | |
features : { QuerySelector : true } | |
, html : htmlStub | |
, done : function(errors, window) { |
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 request = require('request') | |
, path = require('path') | |
, fs = require('fs') | |
, url = "https://api.github.com/users/thomastraum/gists" | |
, savepath = './gists'; | |
request(url, function (error, response, body) { | |
if (!error && response.statusCode == 200) { |
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 `node d3-server.js` | |
// Then visit http://localhost:1337/ | |
// | |
var d3 = require('d3'), | |
http = require('http'), | |
jsdom = require('jsdom/lib/old-api'), | |
fs = require('fs'), | |
xmldom = require('xmldom'); | |
http.createServer(function (req, res) { |