Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Sehyun Chung sehyunchung

🏠
Working from home
View GitHub Profile
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
View stitchesBreakpointUtils.ts
// stitches.config.ts
import { createStyled } from '@stitches/react';
export type StitchesConfigsType = Parameters<typeof createStyled>[number];
function getItemOrLastItem<Item extends string | number>(
list: Item[],
itemIndex: number,
): Item | undefined {
@sehyunchung
sehyunchung / gist:ac18cfc9901a41699b7b78248e7bd1f2
Last active Jun 30, 2020
blueprint bookmarklet based on zaydek.github.com/debug.css
View gist:ac18cfc9901a41699b7b78248e7bd1f2
javascript: /* debug.css | MIT License | zaydek.github.com/debug.css */ if (!("is_debugging"in window)) { is_debugging = false; var debug_el = document.createElement("style"); debug_el.append(document.createTextNode(`*:not(path):not(g) { color: hsla(210, 100%, 100%, 0.7) !important; background: hsla(211, 80%, 28%, 0.5) !important; outline: solid 1px hsla(210, 100%, 100%, 0.5) !important; box-shadow: none !important; filter: none !important; }`)); } function enable_debugger() { if (!is_debugging) { document.head.appendChild(debug_el); is_debugging = true; } } function disable_debugger() { if (is_debugging) { document.head.removeChild(debug_el); is_debugging = false; } } !is_debugging ? enable_debugger() : disable_debugger();