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
// ==UserScript== | |
// @name vasilysu_calc_cheat | |
// @namespace http://gist.github.com/ | |
// @homepage http://dikey0ficial.rf.gd/vasilysu_calc_cheat.html | |
// @version 1.1 | |
// @description Simple cheat script to skip unsolvable games on http://vasily.su/calculator-game/ | |
// @author d!key | |
// @match http://vasily.su/calculator-game/level_random1.html | |
// @match http://vasily.su/calculator-game/level_random2.html | |
// @match http://vasily.su/calculator-game/level_random3.html |
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
// let db = connect('...') | |
let fs = require('fs') | |
function dumpCollection(col_name, dump_path) { | |
let col = db[col_name].find().toArray(); | |
if (!dump_path) { | |
dump_path = './backup/' | |
} | |
fs.writeFile(dump_path + col_name + '.json', JSON.stringify(col), function (err) { | |
if (err) { |