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 / 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);
}
{
"Url": "image.url",
"Date": "date.past"
}
enum ACCOUNT_STATE {
ACTIVE
CLOSED
PENDING
SUSPENDED
}
scalar AWSDateTime
scalar AWSEmail
@remy
remy / spotify-rewrite.js
Last active February 3, 2024 11:30
Modifies Spotify to remove episodes, audiobooks, podcasts and shows.
rewriteFetch([
{
url: "/pathfinder/v1/query",
query: /operationName=home&/,
modify: {
json(data) {
const block = ["episodes", "audiobooks", "podcasts", "shows"];
data.data.home.sectionContainer.sections.items =
data.data.home.sectionContainer.sections.items.filter((res) => {
if (!res.data.title) return true;
from machine import I2S, I2C, Pin, SPI
from ssd1306 import SSD1306_I2C
import array
import math
import time
import sdcard
import os
import struct
import rp2
@remy
remy / crud-removal.css
Last active August 21, 2023 14:46
A user style sheet to remove crud from twitter
/* ==UserStyle==
@name twitter.com - 24/07/2023, 22:01:46
@namespace github.com/openstyles/stylus
@version 1.0.1
@description Remove all the crud from twitter
@author Remy Sharp
==/UserStyle== */
@-moz-document domain("twitter.com") {
h1 a[aria-label="Twitter"] svg, /* stupid new logo */