I hereby claim:
- I am rebolyte on github.
- I am rebolyte (https://keybase.io/rebolyte) on keybase.
- I have a public key whose fingerprint is 539C 63BE 4607 65A6 BCEC 1BD4 C7D2 2C36 3781 BFA3
To claim this, I am signing this object:
| function range(x, y) { | |
| if (typeof y === 'undefined') { | |
| y = x; | |
| x = 0; | |
| } | |
| let out = []; | |
| while (x < y) { | |
| out.push(x++); | |
| } | |
| return out; |
| #!/bin/bash | |
| mode="" | |
| filename="" | |
| # http://stackoverflow.com/a/7069755 | |
| while test $# -gt 0; do | |
| case "$1" in | |
| -h|--help) |
| it('can call a callback that is passed', function () { | |
| let callback = jasmine.createSpy('callback function'); | |
| let putItem = jasmine.createSpy().and.callFake((params, cb) => { | |
| expect(params.id).not.toBeUndefined(); | |
| cb('done'); | |
| }); | |
| putItem({ id: 1 }, callback); |
I hereby claim:
To claim this, I am signing this object:
| let code = "console.log('testing')"; | |
| // encode | |
| let a = [...code] | |
| .map(x => x.charCodeAt()) | |
| .map(x => x.toString(2)) | |
| .join('2'); | |
| // decode | |
| let chars = a.split('2').map(x => parseInt(x, 2)); |
Used here:
| REBOL [] | |
| generate-id: func [/length len /local chars out] [ | |
| chars: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_" | |
| out: copy "" | |
| if none? len [ len: 8 ] | |
| loop len [ | |
| random/seed form now/precise | |
| ind: random/secure length? chars | |
| append out pick chars ind |
| /* jshint esversion:6, node: true */ | |
| let http = require('http'); | |
| let querystring = require('querystring'); | |
| let moment = require('moment-timezone'); | |
| const PORT = 8081; | |
| let server = http.createServer(function (req, res) { | |
| let qs = req.url.split('?'); |
| // https://www.reddit.com/r/javascript/comments/4eb61r/interview_exercise_feedback/ | |
| function isBalanced(str) { | |
| var dict = { | |
| '{': '}', | |
| '(': ')', | |
| '[': ']' | |
| }; | |
| var stack = []; | |
| for (var i = 0; i < str.length; i++) { |
| body-parser - 837KB, 188 items, 10 immediate deps, 18 total deps | |
| cookie-parser - 29KB, 19 items, 2 immediate deps, 2 total deps | |
| express - 935KB, 302 items, 25 immediate deps, 39 total deps | |
| express-jwt - 1.5MB, 721 items, 4 immediate deps, 31 total deps | |
| express-winston - 701KB, 214 items, 3 immediate deps, 13 total deps | |
| helmet - 543KB, 252 items, 11 immediate deps, 35 total deps | |
| jsonwebtoken - 521KB, 254 items, 3 immediate deps, 26 total deps | |
| useragent - 245KB, 35 items, 1 immediate dep, 1 total dep | |
| winston - 471KB, 135 items, 7 immediate deps, 7 total deps | |
| winston-cloudwatch - 15.6MB, 2866 items, 3 immediate deps, 97 total deps (!) |