Skip to content

Instantly share code, notes, and snippets.

View eliottness's full-sized avatar
💭
OSS Engineer @ Datadog

Eliott B eliottness

💭
OSS Engineer @ Datadog
  • Datadog
  • Paris, France
View GitHub Profile

Cross-compilation-safe FFI for a pre-compiled C library that must ship dormant and activate at runtime

Status: Problem statement for Go-team review, not a proposal. It stops deliberately at "here is the problem and who it hurts"; candidate solutions will be filed separately.
Authors: Eliott Bouhana
Affected projects: DataDog/dd-trace-go, DataDog/go-libddwaf, DataDog/libddwaf, ebitengine/purego.
Reading time: 7 min


Summary

@eliottness
eliottness / a-model-switch-that-cost-2300-dollars.md
Last active August 17, 2026 10:22
2300$ for a mid-session switch to a pro reasoning mode in opencode v1.18.18: billed prompt tokens mistaken for context length, a spurious compaction loop, and a prompt-cache collapse. Post first, appendices for detail.

The model switch that cost $2,300

I switched models once, in the middle of a long coding session. Same repo, same task, same tools. I did not change my prompt or my workflow. Then I switched back.

The session kept a record of all three phases, which turns an anecdote into something closer to a controlled experiment:

phase model requests cost cache hit uncached input per request compactions
1 gpt-5.6-sol 184 $88.02 97.3% 3 0
2 gpt-5.6-sol-pro 608 $2,150.73 56.0% 229,499 23
@eliottness
eliottness / immich-ios-livephoto-mov-rootcause.md
Created June 30, 2026 21:05
Immich iOS Live Photo .MOV-is-a-JPEG (#24763): upload-side cause + server blind spot, with code paths and a failing test

iOS Live Photo .MOV that's actually a JPEG: where it comes from (#24763)

Follow-up to my earlier writeup (https://gist.github.com/eliottness/0a2cb17ddf578ab619d7b3f693ed2787), which proved the stored "video" is really an HDR MPF JPEG. This one is about why it happens, with the actual code paths, and where a fix could go. I read through the current main mobile and server code for this. I haven't been able to test on a device yet, so I've tried to separate what I'm sure of from what I'm inferring.

Quick recap of the symptom

@eliottness
eliottness / immich-livephoto-investigation.md
Created June 30, 2026 15:52
Immich: iOS Live Photo .MOV is actually an HDR JPEG (MPF + gain map) — investigation (re #24763)

iOS Live Photo .MOV is actually an HDR JPEG (MPF + gain map) — investigation

Related to immich-app/immich#24763.

Symptom

Some iPhone Live Photos uploaded through the iOS app show their ~3s "motion" clip flashing black and white in the viewer. The still looks fine; the video portion cycles colour → grayscale → black.

@eliottness
eliottness / wsa-debugging-report.md
Created June 26, 2026 21:39
WSABuild on Windows 11 25H2 (26200.8655) — full debugging report: root cause = WsaService never calls HCS to boot the Android guest

WSABuild on Windows 11 25H2 — Full Debugging Report

Date: 2026-06-26 System: Windows 11 25H2, build 26200.8655 (retail), driven entirely from WSL2 via powershell.exe Subject: WSABuild 2407.40000.4.0 (community Windows Subsystem for Android, Magisk + MindTheGapps) — Google Play Store never appears after install Outcome: Root cause identified — a build-level incompatibility at the WsaService→HCS activation layer. Not fixable with current community tooling. WSA fully removed at user request.


TL;DR

@eliottness
eliottness / README.md
Last active October 30, 2026 01:36
Bitwarden SSH agent in WSL2 via a systemd user service (socat + npiperelay) — with the gotchas that make ssh-add hang

Bitwarden SSH agent in WSL2 (via systemd)

Use the SSH keys stored in your Windows Bitwarden Desktop vault from inside WSL2 — ssh, git, ssh-add, etc. — managed by a systemd user service instead of a fragile .zshrc snippet.

This bridges the Windows OpenSSH-agent named pipe that Bitwarden exposes (\\.\pipe\openssh-ssh-agent) to a Unix socket inside WSL using npiperelay + socat.

@eliottness
eliottness / youtube-stage1
Last active October 24, 2026 13:15
YouTube TV non-Steam shortcut for Bazzite / gamescope (Firefox kiosk inside nested KDE Wayland)
#!/bin/sh
unset LD_PRELOAD
export LANG=fr_FR.UTF-8
export LC_ALL=fr_FR.UTF-8
export XDG_CONFIG_HOME="$HOME/.config/kwin-nested"
export ffwidth="$(xdpyinfo | grep dim | grep -o '[0-9]\+x[0-9]\+ pixels' | sed -r 's/([0-9]+)x([0-9]+).*$/\1/')"
export ffheight="$(xdpyinfo | grep dim | grep -o '[0-9]\+x[0-9]\+ pixels' | sed -r 's/([0-9]+)x([0-9]+).*$/\2/')"
exec dbus-run-session /usr/bin/kwin_wayland_wrapper \
--width "${ffwidth}" --height "${ffheight}" \
--no-lockscreen \
@eliottness
eliottness / amd-sync-flood-fix.md
Last active November 9, 2026 13:26
AMD Ryzen Zen 4: random reboots caused by data fabric sync flood (0x08000800) — investigation and fix

AMD Ryzen Zen 3/4 — Random Reboots: Data Fabric Sync Flood (0x08000800)

Symptoms

  • System reboots randomly every 1–4 days with no warning
  • No kernel panic, no OOM, no visible error before crash
  • last -x reboot shows all entries as crash (never a clean shutdown)
  • On next boot, kernel prints:
@eliottness
eliottness / send_mail.sh
Last active March 17, 2026 18:57
Test gmail-relay
#!/usr/bin/env python3
"""
Send a plain-text email via an SMTP server.
Uses:
- SMTP server: CLI arg 1
- From: CLI arg 2
- To: CLI arg 3
Notes:
@eliottness
eliottness / famileo-to-aura.py
Last active November 26, 2025 20:15
Send Famileo Pictures to Aura Frame
import os
from typing import Generator
import requests
import smtplib
from email.mime.multipart import MIMEMultipart
from email.message import EmailMessage
from datetime import datetime
"""
### .Env content ###