Skip to content

Instantly share code, notes, and snippets.

View markreid's full-sized avatar

Mark markreid

  • Culture Amp
  • Australia
View GitHub Profile

Keybase proof

I hereby claim:

  • I am markreid on github.
  • I am markreid (https://keybase.io/markreid) on keybase.
  • I have a public key ASCycZr-FHQl-mr28t-vaQdxjlg9ZZmkZIe9hIEjdIXHiAo

To claim this, I am signing this object:

@markreid
markreid / gitflowrebasing.md
Created January 17, 2017 04:30
git flow with rebasing
@markreid
markreid / backup.sh
Created June 20, 2017 01:03
backup.sh
#!/bin/bash
set -e
# backup.sh
# makes a copy of a file, appending a datestamp and incrementing a counter
# if it's needed.
#
# ie, running this 3 times:
# backup.sh /foo/bar.qux /foo/backups
# will create:
@markreid
markreid / sequential-async.js
Created January 15, 2020 23:06
run async functions sequentially via reduce
/**
* Run a series of async/promisifed functions sequentially,
* returning an array of results and errors.
*
* example:
* const values = [1, 2, 3, 4, 5];
* const callback = async (value) => await someAsyncThing(value)
* const result = await sequentialAsync(values, callback);
*
* @param {Iterable} values
/**
* Run a series of async/promisifed functions sequentially,
* returning an array of results.
* Throws any exceptions.
*
* example:
* const values = [1, 2, 3, 4, 5];
* const callback = async (value) => await someAsyncThing(value)
* const result = await sequentialAsync(values, callback);
*