Skip to content

Instantly share code, notes, and snippets.

@trevordixon
Created May 15, 2015 17:54
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 trevordixon/007de92cdf56329b6708 to your computer and use it in GitHub Desktop.
Save trevordixon/007de92cdf56329b6708 to your computer and use it in GitHub Desktop.
Convert LilyBin MongoDB dump to new DB
var Promise = require('bluebird');
const scores = require('./lib/db');
var LineByLineReader = require('line-by-line'),
lr = new LineByLineReader('scores.json');
lr.on('line', function(line) {
var data = JSON.parse(line);
var id = data['_id'];
console.log(id, data.revisions.length);
Promise.each(data.revisions, function(rev) {
return scores.save(id, rev.code, rev.version);
});
});
@sunnyh007
Copy link

Hi, I am trying to disable roll in flycontrols.js. please help with my code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment