I hereby claim:
- I am ghiden on github.
- I am hidenari (https://keybase.io/hidenari) on keybase.
- I have a public key whose fingerprint is 8A2E 98CD BB28 C287 B43E 8104 2C1A 5D84 CC80 8F5D
To claim this, I am signing this object:
// To run: node job-completion-estimate | |
function sleep() { | |
return new Promise((resolve) => { | |
// add a random jitter of +-0.5 seconds | |
setTimeout(() => resolve(), 1000 - (Math.random() - 0.5) * 1000); | |
}); | |
} | |
function humanReadableTime(duration) { |
getUrl = [[ | |
tell application "System Events" | |
tell application "Firefox" to activate | |
delay .5 | |
tell application "System Events" | |
keystroke "l" using command down | |
keystroke "c" using command down | |
end tell | |
delay .5 | |
set u to the clipboard |
/* | |
Promise.all(arr.map(reflect)).then(function(results){ | |
var success = results.filter(x => x.status === "resolved"); | |
}); | |
*/ | |
module.exports = function reflect(promise){ | |
return promise.then(v => ({v:v, status: "resolved"}), e => ({e:e, status: "rejected"})) | |
} |
I hereby claim:
To claim this, I am signing this object:
[dev] | |
url = "http://dev.example.com" | |
username = "dev.account" | |
password = "devdev" | |
[test] | |
url = "http://test.example.com" | |
username = "test.account" | |
password = "testtest" |
var Q = require('q'); | |
function test() { | |
var d = Q.defer(); | |
setTimeout(function() { | |
d.reject(new Error('failed')); | |
}, 500); | |
return d.promise; |
var Promise = require('bluebird'); | |
function test1() { | |
return new Promise(function(resolve) { | |
setTimeout(function() { | |
console.log('resolve'); | |
resolve(100); | |
}, 500); | |
}); | |
} |
#!/usr/bin/env ruby | |
if ARGV.length != 3 | |
puts 'Need 3 arguments' | |
puts ' calculate-email-distribution INITIAL_SIZE STEP AMOUNT' | |
puts 'e.g.' | |
puts ' calculate-email-distribution 100 20 65000' | |
exit 0 | |
end |
"use strict"; | |
var fs= require('fs'); | |
var Promise = require('bluebird'); | |
var parse= Promise.promisify(require('csv-parse')); | |
var file = fs.readFileSync('test.csv', 'utf8'); | |
var headerKeys; | |
var options ={ | |
trim: true, |
A javascript library for laying out area proportional venn and euler diagrams written by Ben Frederickson.