Skip to content

Instantly share code, notes, and snippets.

Avatar

Taylor Hunt tigt

View GitHub Profile
@tigt
tigt / git-branch-to-favicon.js
Created Mar 18, 2020
Creates an SVG string that can be used as a favicon across different Git branches. Actually getting this into the browser is sadly project-specific.
View git-branch-to-favicon.js
const { execSync } = require('child_process')
const { createHash } = require('crypto')
const invertColor = require('invert-color')
const branchName = execSync('git rev-parse --abbrev-ref HEAD')
const hash = createHash('sha256')
hash.update(branchName)
const color = '#' + hash.digest().toString('hex').substring(0, 6)
const invertedColor = invertColor(color, true)
@tigt
tigt / codepen-logo.original.svg
Created Apr 13, 2016
Sparkbox: 8794 → 1783 bytes (20.3%) ⁂ Codepen: 1762 → 492 bytes (27.9%)
View codepen-logo.original.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tigt
tigt / brotli-static-compression-dictionary.txt
Last active Mar 16, 2020 — forked from anonymous/gist:f66f6206afe40bea1f06
The Web, compressed into a 14,000-word poem
View brotli-static-compression-dictionary.txt
time
down
life
left
back
code
data
show
only
site
@tigt
tigt / gist:a9af3f0dc6fcd38383ed
Last active Aug 29, 2015
Look at this horrible `sizes` I came up with
View gist:a9af3f0dc6fcd38383ed
sizes="(orientation: landscape) and (min-width: calc((7/8 * (100vh - 100px)) + 200px)) calc((100vh - 100px) * 8/7 * 0.7142),
(orientation: landscape) calc((100vw - 200px) * 0.7142),
(min-width: calc(7/8 * (100vh - 200px))) calc((100vh - 200px) * 8/7 * 0.7142),
71.42vw"
@tigt
tigt / web-syntaxes.md
Last active Apr 18, 2016
A list of syntaxes and microsyntaxes that make up the Web today.
View web-syntaxes.md

Syntaxes

How many languages and syntaxes make up the Web?

This list is for code on the front-end; the back-end could be literally anything.

Notice this isn't about vocabularies. Many attributes have only certain values they accept, but syntaxes mean the characters are sorted/processed/handled a different way than usual.

The Big Ones