Skip to content

Instantly share code, notes, and snippets.

View jesstelford's full-sized avatar

Jess Telford jesstelford

View GitHub Profile
@jesstelford
jesstelford / netflix-rpi.md
Last active April 4, 2020 17:52
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!

OSMC

@jesstelford
jesstelford / Makefile
Last active June 12, 2016 12:00
nethack 3.6.0 hints file for debian: `sys/unix/hints/linux`. More: http://jes.st/2015/compiling-playing-nethack-360-on-ubuntu/
#
# 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.
#
#-PRE
# Linux hints file
# This hints file provides a single-user tty build for Linux, specifically
# for Ubuntu dapper.
@jesstelford
jesstelford / event-loop.md
Last active April 28, 2024 06:50
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
jesstelford / README.md
Last active November 14, 2023 12:26
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
jesstelford / README.md
Last active August 29, 2016 08:22
Bug in autoprefixer v6.4.0 when used with postcss-discard-comments v2.0.4
  1. $ git clone https://gist.github.com/3cdebdee4691ce5fdd4ae696db7f296f.git
  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
jesstelford / Links in markdown.md
Last active June 6, 2022 13:56
Putting links in code blocks on GitHub
@jesstelford
jesstelford / LEARNING_JS.md
Last active August 2, 2019 23:58
Learning JS links and suggestions

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)

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 / 01-shape-up-to-kindle.md
Last active January 10, 2024 20:08
Read SHAPE UP by basecamp on a Kindle / reMarkable / eReader

Read Shape Up by basecamp on a kindle / reMarkable / eReader

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

There is a .pdf version, but that's not the best format for Kindle / other eReaders. Instead, we can convert the page-by-page into an eReader friendly format.

Part 1: Convert to a single page

NOTE: This has only been tested on Chrome

@jesstelford
jesstelford / machine.js
Last active August 27, 2019 05:26
Generated by XState Viz: https://xstate.js.org/viz
// Vocal 'publishStatus' state machine
const machineId = 'publishing';
const publishMachine = Machine(
{
id: machineId,
initial: 'draft',
states: {
uninitialized: {
on: {
draft: 'draft',