Skip to content

Instantly share code, notes, and snippets.

@kadamwhite
Created July 17, 2014 20:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kadamwhite/5f36f0ae7d805b2c9e34 to your computer and use it in GitHub Desktop.
Save kadamwhite/5f36f0ae7d805b2c9e34 to your computer and use it in GitHub Desktop.
My best time: 9ms!
{
"name": "dream-speedrun",
"description": "Run through dream.js as fast as possible",
"main": "speedrun.js",
"scripts": {
"start": "node speedrun.js"
},
"license": "WTFPL"
}
'use strict';
var agent = require( 'superagent' );
agent.get(
'https://raw.githubusercontent.com/incompl/dream/master/dream.js'
).end(function( err, result ) {
if ( err ) {
console.error( err );
return;
}
var lines = result.text.split( '\n' );
console.time( 'Speedrun' );
lines.forEach(function( line ) {
console.log( line );
});
console.timeEnd( 'Speedrun' );
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment