Create an observable emitting each item passed in.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // See: https://twitter.com/buildsghost/status/1436394640861646848 | |
| envars | |
| |> Object.keys(in) | |
| |> in.map(envar => `${envar}=${envars[envar]}`) | |
| |> in.join(' ') | |
| |> `$ ${in}` | |
| |> chalk.dim(in, 'node', args.join(' ')) | |
| |> console.log(in) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Runs using the open source Mac app https://www.hammerspoon.org | |
| -- Install Hammerspoon, and then copy this Gist into a file at ~/.hammerspoon/init.lua | |
| require("hs.ipc") | |
| hs.ipc.cliInstall() | |
| local math = require("hs.math") | |
| currentSpeech = nil |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| protocol Actor : AnyObject, Sendable { | |
| associatedtype State | |
| isolated var state: State | |
| } | |
| struct BankAccountState { | |
| var balance: Double | |
| mutating func deposit(amount: Double) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { parse } from "./index"; | |
| test("parse()", () => { | |
| test.each([ | |
| ['Monday', { weekdays: new Set(['monday']) }], | |
| ['Wednesday', { weekdays: new Set(['wednesday']) }], | |
| [' Wednesday ', { weekdays: new Set(['wednesday']) }], | |
| ['Wednesday and Saturday', { weekdays: new Set(['wednesday', 'saturday']) }], | |
| ['Wednesday or Saturday', { weekdays: new Set(['wednesday', 'saturday']) }], | |
| ['Wednesday, Saturday', { weekdays: new Set(['wednesday', 'saturday']) }], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const pedestrianStates = { | |
| initial: 'walk', | |
| states: { | |
| walk: { | |
| on: { | |
| PED_COUNTDOWN: 'wait' | |
| } | |
| }, | |
| wait: { | |
| on: { |
I hereby claim:
- I am burntcaramel on github.
- I am burntcaramel (https://keybase.io/burntcaramel) on keybase.
- I have a public key ASArnj22CZ7v-9tbcz-52hippT2ZfvGy4dQ3ZoSelHe3lwo
To claim this, I am signing this object:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| interface State { | |
| counter: number | |
| } | |
| const counterModel = { | |
| initial(): State { | |
| return { | |
| counter: 0 | |
| }; | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //: Playground - noun: a place where people can play | |
| import Foundation | |
| struct ExampleStruct : Codable { | |
| var title: String | |
| var something: Int | |
| public func encode(to encoder: Encoder) throws { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM ruby:2.4-alpine | |
| ENV PATH /root/.yarn/bin:$PATH | |
| RUN apk update && apk upgrade && \ | |
| apk add --no-cache bash git openssh build-base nodejs tzdata | |
| RUN apk update \ | |
| && apk add curl bash binutils tar gnupg \ | |
| && rm -rf /var/cache/apk/* \ |