Skip to content

Instantly share code, notes, and snippets.

View ThomasRettig's full-sized avatar
👋
Hello

Thomas Rettig ThomasRettig

👋
Hello
View GitHub Profile
@arrowtype
arrowtype / italic-shift.py
Created December 1, 2021 22:46
A snippet to determine how much horizontal shift a point should get in an italic glyph, in a UFO font.
"""
Here’s a snippet to determine how much horizontal shift a point should get in an italic glyph.
In practical terms, I have just used this to shift anchors in a UFO font source, in order to prepare an oblique font.
Basically, how can we determine "x" below, given a height ("y") and an angle (italicAngle)?
x
- -
| /
@bmaupin
bmaupin / free-backend-hosting.md
Last active July 23, 2024 01:45
Free backend hosting

Font "package manager"

I've been thinking about creating a font management service similar to traditional software package managers (e.g. Debian Aptitude, NPM, etc.)

The basic idea is this:

  1. There's a main repository of fonts that are free (as in free to distribute) that the working group hosts
  2. There's a small program that serves as the "manager", to be used or installed on client systems
  3. The "manager" can be configured to operate with multiple repositories
@AgentOak
AgentOak / youtube_formats.md
Last active July 22, 2024 10:10
Youtube Format IDs

Last updated: April 2021

Also known as itag or format codes and way back they could be specified with the fmt parameter (e.g. &fmt=22). Depending on the age and/or popularity of the video, not all formats will be available.

DASH video

Resolution AV1 HFR High AV1 HFR AV1 VP9.2 HDR HFR VP9 HFR VP9 H.264 HFR H.264
MP4 MP4 MP4 WebM WebM WebM MP4 MP4
@kripken
kripken / hello_world.c
Last active January 17, 2024 12:15
Standalone WebAssembly Example
int doubler(int x) {
return 2 * x;
}
@luruke
luruke / smashingmagazine.js
Last active January 12, 2022 15:34
Source code of the demo "Improving User Flow Through Page Transitions" on Smashing Magazine.
/*
https://www.smashingmagazine.com/2016/07/improving-user-flow-through-page-transitions/
You can copy paste this code in your console on smashingmagazine.com
in order to have cross-fade transition when change page.
*/
var cache = {};
function loadPage(url) {
if (cache[url]) {
var File = function(url, object){
File.list = Array.isArray(File.list)? File.list : [];
File.progress = File.progress || 0;
this.progress = 0;
this.object = object;
this.url = url;
};
File.indexOf = function(term){
for(var index in File.list){
@eyecatchup
eyecatchup / apple-meta-insanity.html
Created February 8, 2015 12:28
Insanity of Apple-specific meta tags..
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Apple Meta Insanity</title>
<!--
APPLE WEB APP META TAGS
-->
@willurd
willurd / web-servers.md
Last active July 23, 2024 17:12
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000