Skip to content

Instantly share code, notes, and snippets.

researching video players

Tom Byrer tomByrer

researching video players
Block or report user

Report or block tomByrer

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
necolas / using-OnLayout.js
Last active Mar 14, 2019
React Pressable / OnLayout
View using-OnLayout.js
* OnLayout is built upon: View (and ResizeObserver), StyleSheet
const elementBreakpoints = {
small: { minWidth: 200 },
medium: { minWidth: 300 }
large: { minWidth: 500 }
View minimal-analytics-snippet.js
(function (context, trackingId, options) {
const history = context.history;
const doc = document;
const nav = navigator || {};
const storage = localStorage;
const encode = encodeURIComponent;
const pushState = history.pushState;
const typeException = 'exception';
const generateId = () => Math.random().toString(36);
const getId = () => {
dominictarr /
Created Nov 26, 2018
statement on event-stream compromise

Hey everyone - this is not just a one off thing, there are likely to be many other modules in your dependency trees that are now a burden to their authors. I didn't create this code for altruistic motivations, I created it for fun. I was learning, and learning is fun. I gave it away because it was easy to do so, and because sharing helps learning too. I think most of the small modules on npm were created for reasons like this. However, that was a long time ago. I've since moved on from this module and moved on from that thing too and in the process of moving on from that as well. I've written way better modules than this, the internet just hasn't fully caught up.


otherwise why would he hand over a popular package to a stranger?

If it's not fun anymore, you get literally nothing from maintaining a popular package.

One time, I was working as a dishwasher in a restu

zeusdeux / transaction.js
Created Nov 20, 2018
Simple transaction in js
View transaction.js
* @description
* Returns a transaction object which is composed of operations.
* The transaction resolves only when all operations it is made of succeed.
* If any operation fails, it reverts ALL operations and rejects the transaction.
* If any of the reverts also fail, then it rejects the transaction as well
* with an error that can help the developer manually make data consistent.
* @param {function} transaction - A function that builds operations and calls run on them
View *


Installation (sorry)

npm i THIS_URL



This will log the currently active element as it changes. Really great for accessibility testing when you're trying to figure out what element has focus (so you can either prevent it from getting focus or make the fact that it has focus more visually obvious for example).

bradtraversy /
Last active Oct 18, 2019
Online Resources For Web Developers (No Downloading)
sw-yx /
Last active Oct 15, 2019
Gatsby bootstrap lifecycle

Sequence of Gatsby's bootstrap lifecycle with links to source code as of v2.0.0


  1. open and validate gatsby-config (get-config-file.js) 1.5 load themes (swyx added this note July 2019)
  2. load plugins (load-plugins/index.js) from the list given in gatsby-config.js
  3. onPreBootstrap: runs onPreBootstrap if it is implemented in any plugins, for example gatsby-plugin-typography. Receives handy [apiCallArgs](
surma / package.json
Created Apr 18, 2018
Boilerplate for quick one-off TypeScript projects. Just run `npm start`
View package.json
"name": "tsquickstart",
"version": "1.0.0",
"description": "Boilerplate for quick one-off TypeScript projects. Just run `npm start`",
"scripts": {
"init": "test -f tsconfig.json || (tsc --init -t ESNext -m ESNext && npm install)",
"start": "npm run init && concurrently \"npm run watch\" \"npm run serve\"",
"serve": "http-server",
"watch": "tsc -p . --watch",
"build": "tsc -p ."
You can’t perform that action at this time.