Skip to content

Instantly share code, notes, and snippets.

Avatar

Jess Telford jesstelford

View GitHub Profile
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// - XState (all XState exports)
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// - XState (all XState exports)
@jesstelford
jesstelford / README.md
Last active Jul 9, 2020
A fork of Capsize used to generate a typographic scale (https://github.com/seek-oss/capsize)
View README.md

A fork of Capsize used to generate a typographic scale (https://github.com/seek-oss/capsize)

Generate the typographic scale by running generate-typographic-scale.js:

node generate-typographic-scale.js

Add it to your Chakra UI theme under the key typography:

@jesstelford
jesstelford / detect-dangling-relationships.js
Last active Apr 14, 2020
Detect relationship inconsistencies in Keystone databases prior to the [Arcade](https://www.keystonejs.com/discussions/new-data-schema) release
View detect-dangling-relationships.js
/**
* NOTE: We use console.error for log output below so that the output can be
* redirected to a file by the user
*/
const path = require('path');
const entryFile = process.argv[2];
if (!entryFile) {
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
View machine.js
// Vocal 'publishStatus' state machine
const machineId = 'publishing';
const publishMachine = Machine(
{
id: machineId,
initial: 'draft',
states: {
uninitialized: {
on: {
draft: 'draft',
View machine.js
// Partial representation of old `publishStatus` & `reviewStatus` states in Legacy Vocal.
// See https://xstate.js.org/viz/?gist=6a25309b09bd2a70a9a678ca9ee7fa2b for the latest Replatform version.
const machineId = 'publishing';
const publishMachine = Machine({
id: machineId,
initial: 'draft',
states: {
draft: {
on: {
SUBMIT: 'submitted',
View machine.js
// Vocal 'publishStatus' state machine
const machineId = 'publishing';
const publishMachine = Machine(
{
id: machineId,
initial: 'draft',
states: {
uninitialized: {
on: {
draft: 'draft',
@jesstelford
jesstelford / README.md
Last active Nov 21, 2020
Read SHAPE UP by basecamp in a single page or on a Kindle
View README.md

Read Shape Up by basecamp in a single page

Basecamp's new book Shape Up is now available online (https://basecamp.com/shapeup) to read page-by-page.

To read it all in a single page:

  1. Go to the first chapter: https://basecamp.com/shapeup/0.1-foreword
  2. In the URL bar, type javascript:
  3. Paste in this single line of JavaScript (so the URL bar looks like javascript:var style=do...)
View LEARNING_WEBDEV.md

Getting started

  • Everything except images in a website is text, so it's a lot of reading and writing. As such, it makes sense to use an editor built for the purpose to make your life easier.
  • Install Visual Studio Code (VSCode): https://code.visualstudio.com/
  • There are 3 main technologies that make up a website: HTML, CSS, JavaScript (JS)
You can’t perform that action at this time.