Skip to content

Instantly share code, notes, and snippets.

View JeanChristopheMorinPerso's full-sized avatar

Jean-Christophe Morin JeanChristopheMorinPerso

View GitHub Profile
@sqs
sqs / btw.ts
Last active August 1, 2026 18:52
// Put this in .amp/plugins/ask-user-choice.ts, then run `amp`.
// When you're working in another thread, run `ctrl-o btw <enter>` to run this.
//
// See https://ampcode.com/manual#plugins for more information about Amp plugins.
import type { PluginAPI, ThreadID } from '@ampcode/plugin'
const threadURL = (ampURL: URL, threadID: ThreadID): URL => {
const url = new URL(ampURL.toString())
url.pathname = `/threads/${threadID}`
// .amp/plugins/ask-user-choice.ts
//
// See https://ampcode.com/manual#plugins for more information about Amp plugins.
import type { PluginAPI } from '@ampcode/plugin'
export default function (amp: PluginAPI) {
amp.registerTool({
name: 'ask_user_choice',
description:
'Present the user with a multiple choice question when there are several possible approaches and you need them to pick one. Use when you have 2-5 concrete options to choose from.',
@thesamesam
thesamesam / xz-backdoor.md
Last active October 2, 2026 05:41
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Update: I've disabled comments as of 2025-01-26 to avoid everyone having notifications for something a year on if someone wants to suggest a correction. Folks are free to email to suggest corrections still, of course.

Background

If you link a program with a compiler driver (clang/gcc) in a standard way (not -nostdlib), the following components are usually on the linker command line.

  • crt1.o (glibc/musl): -no-pie/-pie/-static-pie
    • crt1.o: -no-pie
    • Scrt1.o: -pie, -shared
    • rcrt1.o: -static-pie
    • gcrt1.o:
  • crti.o (glibc/musl)
  • crtbegin.o
  • crtbegin.o: -no-pie