Skip to content

Instantly share code, notes, and snippets.

View eliheuer's full-sized avatar

Eli Heuer eliheuer

View GitHub Profile
# modified from https://gist.github.com/simoncozens/699aa96e98321e19a0a2cccbce994c47
# python3 activity.py DDMMYY DDMMYY
import sys
import requests
from dateutil.parser import parse
from dateutil.relativedelta import relativedelta, FR
from datetime import datetime
import os
@eliheuer
eliheuer / vf-normalize.py
Created August 31, 2023 18:18
vf-normalize.py
def remap(value, inputMin, inputMax, outputMin, outputMax):
inputSpan = inputMax - inputMin # FIND INPUT RANGE SPAN
outputSpan = outputMax - outputMin # FIND OUTPUT RANGE SPAN
valueScaled = float(value - inputMin) / float(inputSpan)
return outputMin + (valueScaled * outputSpan)
test01 = remap(0, -100, 100, 20, 250)
print(test01)
MINI-M1 ๐ŸŒŽ็ฆ ~/Google-Fonts/gf-fork-packager
10072 ๐Ÿ”… : gftools packager "Chilanka" fonts/ -p [~]
Font Family "Chilanka" is on Google Fonts under "ofl".
Using upstream.yaml from google/fonts for Chilanka.
Do you want to edit the current upstream configuration?
Your options y=yes,[n]=no:y
temp file name is /var/folders/ht/8b6qb9pj7csc3pn8bgwwx3j80000gn/T/upstreamodbvjvef.yaml
Creating package with
----- upstream configuration (no comments, normalized) -----
name: Chilanka
@eliheuer
eliheuer / GF-New-M2-mac-setup-2023.md
Last active August 12, 2023 03:04
GF-New-M2-mac-setup-2023

GF New M2 mac setup 2023

is gftools qa depricated?

@eliheuer
eliheuer / metrics_compatible.py
Created August 10, 2023 16:05 — forked from m4rc1e/metrics_compatible.py
Check whether two fonts are metrics compatible by testing on random strings
import random
import string
import uharfbuzz as hb
import sys
from fontTools.ttLib import TTFont
def generate_random_string(fp):
f = TTFont(fp)
cmap = f.getBestCmap()
length = random.randint(3, 100)
@eliheuer
eliheuer / gf-glyphset-check.py
Last active December 30, 2022 06:46
This script iterates through the full Google Fonts catalog and checks each font to see how many codepoints from the GF_Latin_African.txt glyphset are included. Can be modified to work with other glyphsets as needed.
# To use this script, place it in a directory with a clone of the
# Google Fonts "fonts" directory and a text file from GF-Glyphssets.
# .
# โ”œโ”€โ”€ GF_Latin_African.txt
# โ”œโ”€โ”€ fonts
# โ””โ”€โ”€ gf-glyphset-check.py
#
# See links below:
#
# https://github.com/google/fonts
@eliheuer
eliheuer / GF-Proof-extra-text-HB.html
Created October 20, 2022 02:13
GF proof extra text HB
<hr>
<div dir="auto" class="Solitreo-Regular" style="font-size: 14pt">ืฉื‘ืชื™, ื™ื•ืกืฃ, ืžื™ื›ืืœ, ื—ื™ื™ื, ื™ืฉืจืืœ ืื™ืก ืืงื™, ืžื™ืก ืื•ืœื˜ื™ืžืืก ื‘'ื•ืœื•ื ื˜ืื“'ื™ืก, ืงื™ ื‘'ื•ืก ืจื™ืงื•ืžื™ื ื“ื• ื“ื™ ืื™ื ื’'ื™ืจ, ืกื™ืŸ ืžืื ืงืืจ ื ืื“'ื”. ืื™ ืงื™ ื‘'ื•ืก ืื’ื•, ืื™ืŸ ื™ื™ื ื” ืงื•ื ืกื™ื™ื ืกื™ื™ื”, ืื™ ืื™ืŸ ืกืืœื•ื“', ืื™ืกืคื™ืจื• ืงื™ ืžื™ ืื•ื ื•ืจืืจื™ืฉ, ื“ื™ืกืคื•ืื™ืก ื“ื™ ืžื™ ืžื•ืื™ืจื˜ื™ ืืœ ื˜ืื ื˜ื• ืงื™ ืžื™ ืื•ื ื•ืจืื˜ื™ืฉ ืื™ืŸ ื‘'ื™ื“'ื” ืคืืก ืื™ ืื•ื ื™ื™ื•ืŸ! ื™</span>
<hr>
<div dir="auto" class="Solitreo-Regular" style="font-size: 14pt">ืœื ื™ื”ื ืื“ื ื ืชื•ืŸ ืœื”ืชืขืจื‘ื•ืช ืฉืจื™ืจื•ืชื™ืช ื‘ื—ื™ื™ื• ื”ืคืจื˜ื™ื™ื, ื‘ืžืฉืคื—ืชื•, ื‘ืžืขื•ื ื•, ื‘ื—ืœื™ืคืช ืžื›ืชื‘ื™ื ืฉืœื• ื•ืœื ืœืคื’ื™ืขื” ื‘ื›ื‘ื•ื“ื• ืื• ื‘ืฉืžื• ื”ืคื•ื‘ ื›ืœ ืื“ื ื–ื›ืื™ ืœื”ื’ื ืช ื”ื—ื•ืง ื‘ืคื ื™ ื”ืชืขืจื‘ื•ืช ืื• ืคื’ื™ืขื” ื‘ืืœื” ื›ืœ ืื“ื ื–ื›ืื™ ืœื—ื™ืจื•ืช ื”ืžื—ืฉื‘ื”, ื”ืžืฆืคื•ืŸ ื•ื”ื“ืช; ื—ื™ืจื•ืช ื–ื• ื›ื•ืœืœืช ืืช ื”ื–ื›ื•ืช ืœื”ืžื™ืจ ืืช ื“ืชื• ืื• ืืช ืืžื•ื ืชื• ื•ืœืชืช ื‘ื˜ื•ื™ ืœื“ืชื• ืื• ืœืืžื•ื ืชื•, ืœื‘ื“ื• ืื• ื›ืฆื™ื‘ื•ืจ, ื‘ืจืฉื•ืช ื”ื™ื—ื™ื“ ืื• ื‘ืจืฉื•ืช ื”ืจื‘ื™ื, ื“ืจืš ื”ื•ืจืื”, ื ื•ื”ื’, ืคื•ืœื—ืŸ ื•ืฉืžื™ืจืช ืžืฆื•ื•ืช</span>
<hr>
<div dir="auto" class="Solitreo-Regular" style="font-size: 14pt">ืงืื“ื— ื‘ื ืื“ื ืื™ ื‘ื ืื“ื ื ืืกื™ ืคื•ืจืจื• ืื™ ืื™ื’ื•ืื• ืื™ืŸ ื“ื™ื ื™ื™ื™ื“ืื“ ืื™ืŸ ื“ื™ืจื™ื’ืณื•ืก ื˜ื•ื“ื•ืก ืกื•ืŸ ื‘ืขืœื” ืจืื–ื•ืŸ ืื™ ืงื•ื ืกื™ื™ื ืกื™ื” ืื™ ื“ื™ื‘ืณื™ืŸ ืงื•ืžืคื•ืจื˜ืืจืกื™ืŸ ืœื•ืก ืื•
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@eliheuer
eliheuer / gh-timesheet.py
Created March 18, 2022 00:23 — forked from simoncozens/gh-timesheet.py
gh-timesheet.py
import requests
from dateutil.relativedelta import relativedelta, FR
from datetime import datetime
lastweek = datetime.utcnow().replace(hour=0,microsecond=0) + relativedelta(weekday=FR(-1))
headers = {"Authorization": "bearer "+GITHUB_TOKEN}
def run_query(query):
request = requests.post('https://api.github.com/graphql', json={'query': query}, headers=headers)
@eliheuer
eliheuer / bezier_drawbot.py
Created February 8, 2022 21:59 — forked from justvanrossum/bezier_drawbot.py
Bezier demo for DrawBot
def lerp(v1, v2, t):
return v1 + t * (v2 - v1)
def lerpPoint(p1, p2, t):
return lerp(p1[0], p2[0], t), lerp(p1[1], p2[1], t)
def circle(p, r):
x, y = p
d = r * 2
oval(x - r, y - r, d, d)