Skip to content

Instantly share code, notes, and snippets.


Viktor Hedefalk hedefalk

View GitHub Profile
hedefalk / io.ts
Created December 15, 2021 17:03 — forked from thoradam/io.ts
Pure TypeScript
View io.ts
// Did you know JavaScript has pure functions*?
// *: just add asterisks!
* Describes a computation that requires `E` to produce an `A`. Has to be run
* to do anything.
* We could also do something like:
* `type Async<E,A> = Generator<void,Promise<A>,E>`
View btsync
# btsync service
# Replace with linux users you want to run BTSync clients for
start() {
for btsuser in $BTSYNC_USERS; do
HOMEDIR=`getent passwd $btsuser | cut -d: -f6`