Skip to content

Instantly share code, notes, and snippets.

Jess Telford jesstelford

View GitHub Profile
@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 Jul 22, 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)
@jesstelford
jesstelford / LEARNING_JS.md
Last active Aug 2, 2019
Learning JS links and suggestions
View LEARNING_JS.md

Learn by doing

If you're brand new to the language (welcome!) start here: http://jsforcats.com/ (Silly name, but excellent content)

If you've already got a little bit of coding under your belt, the ⁠⁠absolute best⁠⁠ place / way to learn is with https://nodeschool.io workshops (Full disclosure; I've written 2 of them)

They're all free open source at your own pace workshops where you are given a bit of info, a task, and you must code it up before you can move on (it runs unit tests over your code to verify you completed it)

@jesstelford
jesstelford / Links in markdown.md
Last active Jul 26, 2020
Putting links in code blocks on GitHub
View Links in markdown.md
You can’t perform that action at this time.