Skip to content

Instantly share code, notes, and snippets.

View jcmorrow's full-sized avatar

Josh Morrow jcmorrow

View GitHub Profile
@jcmorrow
jcmorrow / machine.js
Last active November 18, 2022 17:46
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
if (window.Shopify && window.Shopify.checkout) {
console.log("CHECKOUT FOUND");
}
console.log("RUNNING");

Li Chess Development Notes

OK, Puzzle development is hard to setup! Here's how you do it: Get a local setup, and a user! Upload this puzzle document to the puzzle collection:

{
    "_id" : 61053,
    "gameId" : "khzYI5hN",
    "history" : "h7h6",
 "fen" : "8/1p3rkp/6p1/1b6/4PnPP/5P2/3Q4/6K1 b - - 0 38",
import re
import click
class Tokenizer:
TOKENS = [
("\\(", "list_start"),
("\\)", "list_end"),
("\\b[a-zA-z]+\\b", "atom"),
("\\b[0-9]+\\b", "integer"),
@jcmorrow
jcmorrow / puzzle.json
Created January 31, 2019 00:58
puzzle.json
{
"game": {
"id": "lKwK21rd",
"perf": {
"icon": ")",
"name": "Blitz"
},
"rated": true,
"players": [
{