Skip to content

Instantly share code, notes, and snippets.

View tomByrer's full-sized avatar
🎦
researching video players

Tom Byrer tomByrer

🎦
researching video players
View GitHub Profile
@tomByrer
tomByrer / lightable_solarized-light.css
Created June 16, 2013 05:27
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…
/*
Solarized theme for code-mirror
http://ethanschoonover.com/solarized
http://ethanschoonover.com/solarized/img/solarized-palette.png
*/
.solarized-light.base03 { color: #002b36; }
.solarized-light.base02 { color: #073642; }
.solarized-light.base01 { color: #586e75; }
.solarized-light.base00 { color: #657b83; }
@tomByrer
tomByrer / A.markdown
Last active August 29, 2015 14:09 — forked from larrybotha/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
tomByrer / twemoji-1f63b-widthheight.svg
Created November 13, 2014 17:43
Testing adding width & hight to twemoji's SVG
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tomByrer
tomByrer / English-Homophones.md
Last active October 6, 2023 11:56
English Homophones

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
tomByrer / jpeg_split.c
Created December 17, 2016 02:33 — forked from Hodapp87/jpeg_split.c
Write each scan from a multi-scan/progressive JPEG.
// 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,
@tomByrer
tomByrer / material-ui-jsdelivr-cdn.htm
Created January 22, 2020 14:12
React-MUI using jsDelivr CDN for in-browser hydration.
<!DOCTYPE html>
<html lang="en">
<head>
<title>My page</title>
<meta charset="utf-8" />
<meta name="viewport" content="minimum-scale=1, initial-scale=1, width=device-width" />
<script src="https://cdn.jsdelivr.net/combine/npm/react@16.12/umd/react.development.js,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: https://github.com/mui-org/material-ui/blob/master/examples/cdn/index.html -->
@tomByrer
tomByrer / machine.js
Last active August 11, 2020 00:48
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@tomByrer
tomByrer / machine.js
Last active September 14, 2020 03:06
Generated by XState Viz: https://xstate.js.org/viz
const superButton = Machine(
{
id: 'superButton',
initial: 'ready',
context: {
disabled: 0
},
states: {
ready: {
on: {
@tomByrer
tomByrer / machine.js
Last active September 5, 2020 11:47
Generated by XState Viz: https://xstate.js.org/viz
const fetchMachine = Machine(
{
id: 'checkbox',
initial: 'down',
context: {
retries: 0
},
states: {
down: {
on: {
@tomByrer
tomByrer / machine.js
Last active September 17, 2020 03:48
Generated by XState Viz: https://xstate.js.org/viz
const labelSwitch = Machine(
{
id: 'labelSwitch',
initial: 'nix',
context: {
retries: 0
},
states: {
nix: {
entry: ['activateNix'],