Skip to content

Instantly share code, notes, and snippets.

Avatar

Michael Uloth ooloth

View GitHub Profile
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
View string.ts
const string = "I'm a bunch o' characters."
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
View machine.js
const shopifyClient = null
const resumeOrCreateOrder = () => {}
const urlHasDiscountCode = () => {}
const applyDiscountCode = () => {}
const discountedProductFound = () => {}
const addItemOnClient = () => {}
const addItemOnServer = () => {}
const removeItemOnClient = () => {}
const removeItemOnServer = () => {}
const updateQuantityOnClient = () => {}
View machine.js
const cartMachine = Machine({
id: 'cartMachine',
initial: 'closed',
states: {
closed: {
on: {
OPEN: 'open',
},
},
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@ooloth
ooloth / App.svelte
Last active Apr 25, 2019
Accordion Example
View App.svelte
<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 Jan 30, 2017
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console