I hereby claim:
- I am paulownia on github.
- I am nullpon (https://keybase.io/nullpon) on keybase.
- I have a public key ASB4dUVrQZrNE2T0n2auSp3-eEKdbYE0QEWH2gs2y_U29go
To claim this, I am signing this object:
| /*eslint no-console: 0 */ | |
| const retryDelay = 100; | |
| const retryCount = 10; | |
| function execute() { | |
| return new Promise((resolve, reject) => { | |
| setTimeout(() => { | |
| const x = Math.random(); | |
| if (x > 0.8) { |
| const crypto = require('crypto'); | |
| class ConsistentHash { | |
| /** | |
| * create new consistent hash object | |
| * | |
| * @param nodeList - node id list | |
| * @param vnSize - number of virtual node (default 100) | |
| * @param algorithm - hash algorithm (default md5) | |
| */ |
| function shuffle(arr) { | |
| for (let i = arr.length; i > 1;) { | |
| const j = Math.floor(Math.random() * i); | |
| i--; | |
| const ie = arr[i]; | |
| arr[i] = arr[j]; | |
| arr[j] = ie; | |
| } | |
| } |
I hereby claim:
To claim this, I am signing this object:
| const table = []; | |
| for (let i = 65; i < 91; i++) table.push(String.fromCharCode(i)); | |
| for (let i = 97; i < 123; i++) table.push(String.fromCharCode(i)); | |
| for (let i = 0; i < 10; i++) table.push(i.toString(10)); | |
| table.push("+"); | |
| table.push("/"); | |
| const rev_table = table.reduce((obj, c, i) => { | |
| obj[c] = i; | |
| return obj; |
| 'use strict'; | |
| function leftpad1(str, len, ch) { | |
| str = String(str); | |
| var i = -1; | |
| if (!ch && ch !== 0) ch = ' '; | |
| len = len - str.length; |
| /* | |
| * https://gist.github.com/kazuho/3300555 | |
| */ | |
| import java.util.Iterator; | |
| public class Main { | |
| public static void main(String[] args) { | |
| FizzBuzz fb = new FizzBuzz(30); | |
| for (String s: fb) { | |
| System.out.println(s); |
| /* | |
| * https://gist.github.com/kazuho/3300555 | |
| */ | |
| import java.util.Iterator; | |
| public class Main { | |
| public static void main(String[] args) { | |
| FizzBuzz fb = new FizzBuzz(30); | |
| for (String s: fb) { | |
| System.out.println(s); |