This is an OpenPGP proof that connects my OpenPGP key to this Github account. For details check out https://keyoxide.org/guides/openpgp-proofs
[Verifying my OpenPGP key: openpgp4fpr:08a83f21244c4876d9ec2c6a5f88f7e8f01d4198]
This is an OpenPGP proof that connects my OpenPGP key to this Github account. For details check out https://keyoxide.org/guides/openpgp-proofs
[Verifying my OpenPGP key: openpgp4fpr:08a83f21244c4876d9ec2c6a5f88f7e8f01d4198]
| /** | |
| * @typedef {TimeUnitTuple[]} TimeUnitTable A table of time units (seconds, minutes, for example), with their corresponding multipliers compared to the last value. The order is important, as each tuple contains a `multiplier`, which is how many times the last value would fit into this one (i.e. there are 60 minutes in an hour, so hour would be [60, 'hours']) | |
| * @typedef {[multiplier: number, label: string]} TimeUnitTuple Intended to be used in an array of the same type, where the `multiplier` represents how many times this unit fits into the last, and `label` is the name of that unit (for example, days) | |
| */ | |
| /** | |
| * Returns the absolute difference between two date objects | |
| * @curried | |
| * @param {(number | Date)} date1 | |
| * @returns {(date2?: number | Date) => number} The difference in milliseconds |
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| timed = async i => new Promise(resolve => { | |
| console.log(`starting ${i}`) | |
| setTimeout(() => { | |
| resolve('done!'); | |
| console.log('yo', i) | |
| }, Math.random() * 5000) | |
| }); | |
| parallel = async count => { | |
| timers = [], msgs = [], indeces = [], start = count; |
I hereby claim:
To claim this, I am signing this object:
| /** | |
| * Changes value to past tense. | |
| * Simple filter does not support irregular verbs such as eat-ate, fly-flew, etc. | |
| * http://jsfiddle.net/bryan_k/0xczme2r/ | |
| * | |
| * @param {String} value The value string. | |
| */ | |
| Vue.filter('past-tense', function(value) { | |
| // Slightly follows http://www.oxforddictionaries.com/us/words/verb-tenses-adding-ed-and-ing | |
| var vowels = ['a', 'e', 'i', 'o', 'u']; |
| /** | |
| * Example Singleton constructor. | |
| * I wish this was extendable but you gotta copy/paste the 2 lines into any object you want to be a Singleton | |
| * | |
| * @returns {*} | |
| * @constructor | |
| */ | |
| function Singleton () { | |
| if ( arguments.callee._singletonInstance ) return arguments.callee._singletonInstance; | |
| arguments.callee._singletonInstance = this; |
| $.fn.countUp = function(timing) { | |
| var max = parseInt(this.text()); | |
| if ( !max ) return false; | |
| var i = 0; | |
| var $this = this; | |
| var delay = timing / max ; | |
| var intv = setInterval(function() { | |
| $this.text(i); | |
| if (i === max) return clearInterval(intv); | |
| i++; |