Skip to content

Instantly share code, notes, and snippets.

researching video players

Tom Byrer tomByrer

researching video players
View GitHub Profile
View machine.js
const labelSwitch = Machine(
id: 'labelSwitch',
initial: 'nix',
context: {
retries: 0
states: {
nix: {
entry: ['activateNix'],
View machine.js
const fetchMachine = Machine(
id: 'checkbox',
initial: 'down',
context: {
retries: 0
states: {
down: {
on: {
View machine.js
const superButton = Machine(
id: 'superButton',
initial: 'ready',
context: {
disabled: 0
states: {
ready: {
on: {
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
tomByrer / material-ui-jsdelivr-cdn.htm
Created Jan 22, 2020
React-MUI using jsDelivr CDN for in-browser hydration.
View material-ui-jsdelivr-cdn.htm
<!DOCTYPE html>
<html lang="en">
<title>My page</title>
<meta charset="utf-8" />
<meta name="viewport" content="minimum-scale=1, initial-scale=1, width=device-width" />
<script src=",npm/react-dom@16.12/umd/react-dom.development.js,npm/@material-ui/core@4.8/umd/material-ui.development.js,npm/@babel/standalone@7.8/babel.min.js" crossorigin="anonymous"></script>
<!-- Seperate Links
src: -->
tomByrer / jpeg_split.c
Created Dec 17, 2016 — forked from Hodapp87/jpeg_split.c
Write each scan from a multi-scan/progressive JPEG.
View jpeg_split.c
// jpeg_split.c: Write each scan from a multi-scan/progressive JPEG.
// This is based loosely on example.c from libjpeg, and should require only
// libjpeg as a dependency (e.g. gcc -ljpeg -o jpeg_split.o jpeg_split.c).
#include <stdio.h>
#include <jerror.h>
#include "jpeglib.h"
#include <setjmp.h>
#include <string.h>
void read_scan(struct jpeg_decompress_struct * cinfo,

English Homophones

Words that sound alike, but are spelled differently (usually different meanings).

Use cases

  • filter out dictionary words, resulting in a word list that reduces confusion for verbal password phrases
  • rhymes (song lyrics, poetry)
  • humor/jokes
tomByrer / twemoji-1f63b-widthheight.svg
Created Nov 13, 2014
Testing adding width & hight to twemoji's SVG
View twemoji-1f63b-widthheight.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View A.markdown

Fix SVG in <img> tags not scaling in IE9, IE10, IE11

IE9, IE10, and IE11 don't properly scale SVG files added with img tags when viewBox, width and height attributes are specified. View this codepen on the different browsers.

Image heights will not scale when the images are inside containers narrower than image widths. This can be resolved in 2 ways.

Use sed in bash to remove width and height attributes in SVG files

As per this answer on Stackoverflow, the issue can be resolved by removing just the width and height attributes.

tomByrer / lightable_solarized-light.css
Created Jun 16, 2013
Hacked Light Table's HOME/.lighttable/css/themes/solarized-light.css, mostly to make selected text readable (now sweet light green background). Also lightened comment text, minor CSS & comments reduction, & removed gutter PNG. Might still work on CodeMirror, which Light Table's editor is based on. Not sure what the licensing should be; can't fin…
View lightable_solarized-light.css
Solarized theme for code-mirror
.solarized-light.base03 { color: #002b36; }
.solarized-light.base02 { color: #073642; }
.solarized-light.base01 { color: #586e75; }
.solarized-light.base00 { color: #657b83; }
You can’t perform that action at this time.