Skip to content

Instantly share code, notes, and snippets.

@tragle
tragle / machine.js
Last active August 1, 2021 20:01
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@tragle
tragle / machine.js
Last active August 1, 2021 14:16
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@tragle
tragle / machine.js
Last active July 30, 2021 19:25
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@tragle
tragle / machine.js
Last active July 25, 2021 20:50
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@tragle
tragle / Cargo.toml
Last active January 31, 2019 02:37
sort_items
serde = "^1.0.59"
serde_derive = "^1.0.59"
[dependencies.wasm-bindgen]
version = "^0.2"
features = ["serde-serialize"]
@tragle
tragle / spellNumber.js
Last active January 31, 2019 02:52
Spells out given integer in English.
function spellNumber(num) {
/* spells out a number, checkbook-style */
if (num == 0) return "zero";
if (num < 0) return "negative " + _spell(Math.abs(num));
return _spell(num);
function _spell(num) {
num = +num; // unstringify