Skip to content

Instantly share code, notes, and snippets.

View shhyou's full-sized avatar
💭
Alive

shuhung shhyou

💭
Alive
View GitHub Profile
@pgaskin
pgaskin / 20261029-github-performance-jankiness-firefox.md
Last active November 5, 2026 10:06
My (seemingly successful?) attempt to root-cause the severe CPU/RAM usage issues and multi-second jankiness for GitHub.com on Firefox.

Why the fuck is GitHub so janky on Firefox lately?

Note: I didn't use AI to write this. I originally had it try to analyze the profiler GC logs, but there wasn't enough information for it to be conclusive (see below).

@haeberlein
haeberlein / acm-firefox.md
Last active October 3, 2026 11:18
Fix ACM Digital Library Loading Times in Firefox

Fix ACM Digital Library Loading Times in Firefox

Problem

The ACM Digital Library currently loads very slow in Firefox. This seems to stem from a lot of :has() selectors used in their CSS stylesheet.

Fix (uBlock Origin)

If you have uBlock Origin installed, you can add the following filter under the "My filters" tab:

@bdeket
bdeket / htdp-with-websocket.rkt
Last active March 26, 2026 03:28
Universe/world with webracket
#lang racket/base
(require racket/match
(file "htdp/htdp-lib/2htdp/image.rkt")
(file "htdp/htdp-lib/2htdp/universe.rkt")
(except-in (file "htdp/htdp-lib/2htdp/private/check-aux.rkt") sexp?)
;; ^^ my websocket branch : https://github.com/bdeket/htdp/tree/websocket
net/rfc6455
net/url
net/head
#!/usr/bin/env bash
set -euo pipefail
# just some sanity checks to make sure the arguments make sense
if ! test -f "${1}"; then
echo "usage: ${0} <file>"
exit 1
fi
file="${1}"
@gambiteer
gambiteer / gambit-life.scm
Created April 19, 2025 18:30
Conway's Game of Life in Gambit Scheme with SRFI 231
(declare
(standard-bindings)
(extended-bindings)
(block)
(not inline) ;; inlining distorts what I want to measure
(safe) ;; default declaration, made explicit
)
(import (srfi 231))
@samdphillips
samdphillips / evdev.rkt
Created December 8, 2023 03:39
Simple Racket library to interact with Linux input event devices
#lang racket/base
(require ffi/unsafe
ffi/unsafe/custodian
ffi/unsafe/define
ffi/unsafe/schedule
racket/struct)
(provide evdev-open
evdev-read
open import Agda.Builtin.Equality using (_≡_; refl)
open import Data.Nat using (ℕ)
open import Relation.Nullary using (¬_)
open import Data.Empty using (⊥-elim; ⊥)
open import Data.Unit.Base using (⊤; tt)
open import Agda.Primitive
open import Data.Product
open import Data.Fin
open import Data.Vec

Comparing PDF files in git diff commands

The typical approach to comparing PDF files in git diff outputs amounts to converting PDF files into texts through pdftotext and show the diff of conversion.

  1. Install the utility pdftotext from the project poppler
  2. Enable the handler pdffiles in diff for PDF files and instruct the handler to call the pdf-astextplain script:
@shhyou
shhyou / bwt.rkt
Created March 27, 2023 03:50
An O(n lg^2 n) implementation of the Burrows-Wheeler transform using the doubling algorithm and an O(n|S|) implementation of the inverse transform using modified radix sort.
#lang racket/base
(require racket/list
racket/vector
racket/bytes
racket/match)
(provide
;; plain implementation of the Burrows-Wheeler transformation
(struct-out bwencode)
@veekaybee
veekaybee / chatgpt.md
Last active August 23, 2026 11:20
Everything I understand about chatgpt

ChatGPT Resources

Context

ChatGPT appeared like an explosion on all my social media timelines in early December 2022. While I keep up with machine learning as an industry, I wasn't focused so much on this particular corner, and all the screenshots seemed like they came out of nowhere. What was this model? How did the chat prompting work? What was the context of OpenAI doing this work and collecting my prompts for training data?

I decided to do a quick investigation. Here's all the information I've found so far. I'm aggregating and synthesizing it as I go, so it's currently changing pretty frequently.

Model Architecture