Skip to content

Instantly share code, notes, and snippets.

View hedefalk's full-sized avatar

Viktor Hedefalk hedefalk

View GitHub Profile
[
{
"name": "Lily58"
},
[
{
"x": 3,
"a": 7
},
"",
@hedefalk
hedefalk / io.ts
Created December 15, 2021 17:03 — forked from thoradam/io.ts
Pure TypeScript
// 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>`
*/
#!/bin/sh
# btsync service
# Replace with linux users you want to run BTSync clients for
BTSYNC_USERS="mendel"
DAEMON=/usr/bin/btsync
start() {
for btsuser in $BTSYNC_USERS; do
HOMEDIR=`getent passwd $btsuser | cut -d: -f6`
config=$HOMEDIR/.sync/config.json