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:
I hereby claim:
To claim this, I am signing this object:
const pedestrianStates = { | |
initial: 'walk', | |
states: { | |
walk: { | |
on: { | |
PED_COUNTDOWN: 'wait' | |
} | |
}, | |
wait: { | |
on: { |
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']) }], |
protocol Actor : AnyObject, Sendable { | |
associatedtype State | |
isolated var state: State | |
} | |
struct BankAccountState { | |
var balance: Double | |
mutating func deposit(amount: Double) { |
-- 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 |
// 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) |
import { DispatchWithoutAction, useEffect, useMemo, useReducer } from 'react'; | |
import type { DependencyList, EffectCallback } from 'react'; | |
/** | |
* A logical clock. | |
* | |
* @returns a tuple with the current clock value, and a stable function that advances the clock. | |
*/ | |
export function useTicker(): [number, DispatchWithoutAction] { | |
return useReducer(n => n + 1, 0); |
/** | |
* Pi to 8 decimal places | |
*/ | |
export const pi = 3.14159265; | |
export const dateFormat = "YYYY/MM/DD"; | |
export const isEnabled = true; | |
export const flavors = ["vanilla", "chocolate", "caramel", "raspberry"]; |
<?php | |
function loader($request) { | |
return getProjects(); | |
} | |
function action($request) { | |
$form = $request.formData(); | |
return createProject([ "title" => $form.get("title") ]); | |
} |