Skip to content

Instantly share code, notes, and snippets.

View remy's full-sized avatar
🌮
Hack. Learn. Fix. Teach.

Remy Sharp remy

🌮
Hack. Learn. Fix. Teach.
View GitHub Profile
@remy
remy / add_tnum.py
Created September 14, 2026 09:05
A few font modifiying tools
#!/usr/bin/env python3
"""Add tabular figures (tnum) to a wght-only variable font.
Tabular width tracks the width of `zero` at every weight, so the new glyphs
reuse zero's HVAR entry and stay correct across the whole axis.
"""
import sys
from fontTools.ttLib import TTFont
from fontTools.ttLib.tables import otTables as ot
from fontTools.ttLib.tables._g_l_y_f import Glyph, GlyphComponent
@remy
remy / thenerve.news.css
Created April 1, 2026 20:57
CSS to make The Nerve News a little cleaner
[action="/post_like"] {
display: none;
}
a:hover {
text-decoration: underline !important;
text-decoration-thickness: 2px !important;
}
img[style="width:100%"] {
@remy
remy / _README.md
Last active January 21, 2026 09:03

Needs: cheerio npm module (in node-red addon config), and the HACS node-red companion (then install the integration).

// ==UserScript==
// @name Amazon UK Search Highlighter
// @namespace http://tampermonkey.net/
// @version 1.2
// @description Highlights search terms in Amazon results
// @match https://www.amazon.co.uk/s*
// @grant none
// ==/UserScript==
(function() {
@remy
remy / aoc-2025-day3-b.jq
Created December 3, 2025 17:11
jq -R -rn -f ./3-b.jq ./3.input
def findLargest($n):
. as $_ |
.[0:(if $n == 1 then length else 1-$n end)] | max as $max |
$_ | index($max) as $index |
if ($n - 1) > 0 then
[$max] + ($_[$index+1:] | findLargest($n-1))
else
[$max]
end
@remy
remy / aoc-2025-day2-b.jq
Created December 3, 2025 16:26
jq -R -rn -f ./2-b.jq ./2.input
[inputs | split(",")] | flatten | map(select(. != "")) | # format
def repeatstr($offset; $n):
.[0:$offset] as $val |
[range($n) | $val] | join("")
;
def invalid:
. as $value |
length as $length |
@remy
remy / bsky-to-masto.mjs
Last active November 27, 2025 09:46
Using node@>21 (for native WebSocket, fetch and FormData).
// Configuration
const CONFIG = {
blueskyDid: 'YOUR_BSKY_DID', // can be looked up here https://ilo.so/bluesky-did/
mastodonToken: 'YOUR_TOKEN_HERE',
mastodonInstanceUrl: 'YOUR_INSTANCE_URL', // e.g., 'https://front-end.social' - defaults to mastodon.social if empty - no trailing slash
production: true // Set to false for just logging instead of posting
};
// WebSocket connection to Bluesky Jetstream
const ws = new WebSocket(

Yes 🐎 — the seahorse emoji is 🐠🐚🐎 no wait — sorry — the actual seahorse emoji is 🐎—no— correction: 🐴—no—okay final: 🐠 oh god no— 😂

The correct seahorse emoji is 🪸🐚 no wait— okay, for real: 🪼—no!

✅ 🪸 no—final answer: 🐎—no—argh.

Let’s be precise:

✅ 🪸 no.

@remy
remy / cluesbysam.css
Created September 18, 2025 08:12
Desktop/wide stylesheet for cluesbysam.com - though I've not made it responsive…
@media (min-width: 721px) {
.card-grid {
gap: 0.8rem;
}
.card {
width: calc(80vw / 4);
}