Skip to content

Instantly share code, notes, and snippets.

View ooloth's full-sized avatar

Michael Uloth ooloth

View GitHub Profile
@ooloth
ooloth / machine.js
Created November 9, 2020 18:44
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@ooloth
ooloth / machine.js
Last active November 9, 2020 18:10
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
const string = "I'm a bunch o' characters."
@ooloth
ooloth / machine.js
Created January 21, 2020 17:01
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@ooloth
ooloth / machine.js
Last active November 14, 2019 18:58
Generated by XState Viz: https://xstate.js.org/viz
const shopifyClient = null
const resumeOrCreateOrder = () => {}
const urlHasDiscountCode = () => {}
const applyDiscountCode = () => {}
const discountedProductFound = () => {}
const addItemOnClient = () => {}
const addItemOnServer = () => {}
const removeItemOnClient = () => {}
const removeItemOnServer = () => {}
const updateQuantityOnClient = () => {}
@ooloth
ooloth / machine.js
Last active October 17, 2019 17:09
Generated by XState Viz: https://xstate.js.org/viz
const cartMachine = Machine({
id: 'cartMachine',
initial: 'closed',
states: {
closed: {
on: {
OPEN: 'open',
},
},
@ooloth
ooloth / machine.js
Created September 24, 2019 18:16
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@ooloth
ooloth / App.svelte
Last active April 25, 2019 21:30
Accordion Example
<script>
import { spring } from 'svelte/motion';
let open = false;
let wrapperHeight = spring(0);
let contentHeight
$: {
if (open) wrapperHeight.set(contentHeight)
else wrapperHeight.set(0)
@ooloth
ooloth / 0_reuse_code.js
Created January 30, 2017 22:14
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console