I hereby claim:
- I am nickpoorman on github.
- I am nickpoorman (https://keybase.io/nickpoorman) on keybase.
- I have a public key whose fingerprint is F54D 717B 258B F44B A8F3 893B 59CC 07EF B0FC 5E29
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| /** | |
| * simple repl for the database | |
| */ | |
| var r = require('rethinkdb'); | |
| var inspect = require('util').inspect; | |
| var connectOpts = { | |
| host: process.HOST || '127.0.0.1', | |
| port: process.PORT || 28015, | |
| }; |
| # node.js # | |
| ########### | |
| lib-cov | |
| *.seed | |
| *.log | |
| *.csv | |
| *.dat | |
| *.out | |
| *.pid | |
| *.gz |
| # node.js # | |
| ########### | |
| lib-cov | |
| *.seed | |
| *.log | |
| *.csv | |
| *.dat | |
| *.out | |
| *.pid | |
| *.gz |
| /* this method is async */ | |
| UserSchema.methods.toPublic = function(done) { | |
| if(typeof done !== "function") { | |
| return undefined; | |
| } | |
| // this is a shared object, so beware of concurrency issues | |
| var publicObj = { | |
| _id: this.id, | |
| email: this.email, |
| for (var i = profile.readBooks.length - 1; i >= 0; i--) { | |
| profile.readBooks[i] | |
| }; |
| function deepTrimAsync(array, cb) { | |
| async.map(array, function(item, callback) { | |
| if(!Array.isArray(item)) { | |
| if(typeof item === 'string') { | |
| item = sanitize(item).trim(); |
| var traverse = require('traverse'); | |
| var bla = ["x", "y", "z", "x", "y", "z", "x", "y", "z", "x", "y", "z", "x", "y", "z", "x", "y", "z", "x", "y", "z", "x", "y", "z"]; | |
| var drp = ["a", "b", "c", "a", "b", "c", "a", "b", "c", "a", "b", "c", "a", "b", "c", "a", "b", "c", "a", "b", "c", "a", "b", "c"]; | |
| var foo = [bla, "l", "m", drp, "n", bla, "l", "m", drp, "n", bla, "l", "m", drp, "n", bla, "l", "m", drp, "n", bla, "l", "m", drp, "n"]; |
| fs = require("fs"); | |
| try { | |
| var config = JSON.parse(""+fs.readFileSync("config.json")); | |
| } catch (ex) { | |
| console.log('got an error: %s', ex); | |
| process.exit(1); | |
| } | |
| console.log(config); |
| Lexer: function(line) { | |
| var lex = { | |
| origLine: line, | |
| line: line, | |
| yytext: null, | |
| token: null, | |
| check: function(tok) { | |
| if(tok == this.token) { | |
| return this.yytext; | |
| } |