Skip to content

Instantly share code, notes, and snippets.

Jess Telford jesstelford

Block or report user

Report or block jesstelford

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jesstelford /
Last active Aug 13, 2019
Read SHAPE UP by basecamp in a single page or on a Kindle

Read Shape Up by basecamp in a single page

Basecamp's new book Shape Up is now available online ( to read page-by-page.

To read it all in a single page:

  1. Go to the first chapter:
  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...)

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):
  • There are 3 main technologies that make up a website: HTML, CSS, JavaScript (JS)
jesstelford /
Last active Aug 2, 2019
Learning JS links and suggestions

Learn by doing

If you're brand new to the language (welcome!) start here: (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 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 / Links in
Last active Aug 12, 2019
Putting links in code blocks on GitHub
View Links in
jesstelford /
Last active Aug 29, 2016
Bug in autoprefixer v6.4.0 when used with postcss-discard-comments v2.0.4
  1. $ git clone
  2. cd 3cdebdee4691ce5fdd4ae696db7f296f
  3. $ npm install
  4. $ npm start
  5. See the bug:
  TypeError: Cannot read property 'constructor' of null
    at clone (/home/teddy/dev/postcss-autoprefixer-bug/node_modules/autoprefixer/lib/prefixer.js:13:21)
    at clone (/home/teddy/dev/postcss-autoprefixer-bug/node_modules/autoprefixer/lib/prefixer.js:31:19)
    at clone (/home/teddy/dev/postcss-autoprefixer-bug/node_modules/autoprefixer/lib/prefixer.js:31:19)
jesstelford /
Last active Jun 15, 2019
Starving the Event Loop with Microtasks

Starving the Event Loop with microtasks

"What's the Event Loop?"

Sparked from this twitter conversation when talking about doing fast async rendering of declarative UIs in Preact

These examples show how it's possible to starve the main event loop with microtasks (because the microtask queue is emptied at the end of every item in the event loop queue). Note that these are contrived examples, but can be reflective of situations where Promises are incorrectly expected to yield to the event loop "because they're async".

  • setTimeout-only.js is there to form a baseline
jesstelford /
Last active Aug 8, 2019
What is the JS Event Loop and Call Stack?

Regular Event Loop

This shows the execution order given JavaScript's Call Stack, Event Loop, and any asynchronous APIs provided in the JS execution environment (in this example; Web APIs in a Browser environment)

Given the code

jesstelford / Makefile
Last active Jun 12, 2016
nethack 3.6.0 hints file for debian: `sys/unix/hints/linux`. More:
View Makefile
# NetHack 3.6 linux $NHDT-Date: 1432512814 2015/05/25 00:13:34 $ $NHDT-Branch: master $:$NHDT-Revision: 1.12 $
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007.
# NetHack may be freely redistributed. See license for details.
# Linux hints file
# This hints file provides a single-user tty build for Linux, specifically
# for Ubuntu dapper.
jesstelford /
Last active Feb 21, 2019
Netflix on Raspberry Pi (incomplete)

Note: as @clibois mentioned below, due to the DRM Netflix uses, all decoding has to be done in CPU, making it somewhat choppy.

Note 2: Even the RPi 3 suffers from these CPU limitations. There is the potentially risky option of overclocking your RPi 3, but I haven't tried this.

If you manage to get smooth playback, please contact me, or post your solution here

UPDATE: I can no longer get this method to work. I have tried using Chromium v47, and v48, and both result in Netflix error "Oops, something went wrong" / C7053-1807, for which I can find no description online. If you manage to get things up and running, please contact me!


jesstelford / asyncSeries.js
Created Apr 27, 2015
asyncSeries to ensure promises complete in correct order
View asyncSeries.js
* Will execute success/fail in the order of the promises in the Iterable, even
* though they are executed in parallel.
* If `fail` is executed, no more promises in the series will be handled.
* @param promises An Iterable of Promises
* @param success a function which accepts the results of the promise
* @param fail a function which accepts the failure of the promise
You can’t perform that action at this time.