I hereby claim:
- I am sramam on github.
- I am sramam (https://keybase.io/sramam) on keybase.
- I have a public key ASCI8gYhUTm48z9FzuBDI_JvHuzIHiZ7PfN8FcLgwhlEsQo
To claim this, I am signing this object:
function createForm() { | |
// global constants, that drive the script | |
var G = { | |
Settings: 'Settings', | |
CSV: 'CSV', | |
Grade: {} | |
}; | |
var SS = SpreadsheetApp.getActive(); |
const pmap = require('p-map'); | |
const delay = (n) => new Promise(res => setTimeout(res, n)); | |
const promises = [ | |
new Promise(async (res) => { | |
await delay(20); | |
res('a') | |
}), | |
new Promise(async (res) => { |
/** | |
A fizzbizz implementation in modern JavaScript | |
*/ | |
const fizzbizz = (n) => { | |
const fz = (n) => { | |
switch(true) { | |
case (n%15 === 0): return 'fizzbizz'; | |
case (n%5 === 0): return 'bizz'; | |
case (n%3 === 0): return 'fizz'; |
/** | |
List of spinners that work on Windows (and mac) | |
*/ | |
'line,pipe,star2,flip,balloon2,noise,boxBounce2,bouncingBar,shark,dqpb,layer'.split(',') | |
import * as traverse from 'json-schema-traverse'; | |
import * as jsonFilter from 'json-schema-filter'; | |
import * as concordance from 'concordance'; | |
import * as _ from 'lodash'; | |
import * as jsonPtr from 'json-ptr'; | |
export enum Modification { | |
Update = 'Update', | |
Recreate = 'Recreate', | |
Noop = 'Noop' |
I hereby claim:
To claim this, I am signing this object:
const StateMachine = require('javascript-state-machine'); | |
const Account = StateMachine.factory({ | |
init: 'open', | |
transitions: [ | |
// open state | |
{name: 'deposit', from: 'open', to: 'open'}, | |
{name: 'withdraw', from: 'open', to: 'open'}, | |
{name: 'available', from: 'open', to: 'open'}, |
const pReduce = require('p-reduce'); | |
const pMap = require('p-map'); | |
const delay = require('delay'); | |
// const batches = [['a'], ['b', 'c'], ['d', 'e', 'f', 'g'], ['h'], ['i'], ['j', 'k']]; | |
const batches = [['a', 'b', 'c', 'd', 'e', 'f', 'g'], ['h'], ['i'], ['j', 'k']]; | |
const step = 2000; | |
const max = 5000; |
/** | |
script adapted from https://www.youtube.com/watch?v=pXUsW6VRQak | |
*/ | |
function myFunction() { | |
var sheetName = 'Sheet1'; | |
var formId = '1LnmQRJX0l586EvNeXYNLujO2vqhqB-Grtfe1J5zfFWI'; | |
var title = 'Form Title here'; | |
var description = | |
'Form description here.' + | |
'This should really be moved to a cell in the sheet.' + |
import * as delay from 'delay'; | |
(<any>Symbol).asyncIterator = Symbol.asyncIterator || Symbol.for("Symbol.asyncIterator"); | |
async function* g() { | |
yield 1; | |
await delay(100); | |
yield* [2, 3]; | |
yield* (async function *() { |