Skip to content

Instantly share code, notes, and snippets.

@0wwafa
0wwafa / PRINT_CLAUDE.md
Last active May 1, 2025 23:51
Print / Export Claude Chat

Go to https://claude.ai/chat/new (or any other chat you had in the past).

Then run this code:

function printClaude() {   // (C) 2024 by ZeroWw. If you use this code, just give me some credit.

    const centralPart = document.getElementsByClassName('mb-1 mt-1')[1].parentElement.parentElement.parentElement.parentElement;

    if (centralPart) {
        // Create a new window for printing
@thesamesam
thesamesam / xz-backdoor.md
Last active April 29, 2025 14:00
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

@nolenroyalty
nolenroyalty / go-to-sleep.sh
Last active January 2, 2025 21:09
A script I run via cron that prompts me to sleep at night
#!/usr/bin/env bash -x
# TO USE:
# 1. MAKE A CONFIG FILE AT ~/.go-to-bed
# it should look like this (don't include hashes in file, this will nag you starting at 12:16 AM until 6:00 AM)
# START_TIME:0.16
# END_TIME:6.0
# HUSHED_UNTIL:2023-11-23T1:40:00
#
# 2. SAVE THIS SCRIPT SOMEWHERE, maybe ~/bin/go-to-bed
@milesrichardson
milesrichardson / result.md
Created November 16, 2023 12:51
OpenAI generated this code from a UX mockup at https://makereal.tldraw.com/
We couldn’t find that file to show.
@jacobd
jacobd / taktech.js
Created October 30, 2023 17:40
taktech Web FM synth keyboard binding
// paste in the js console of https://www.taktech.org/takm/WebFMSynth/
const k1wwhich = { 65: 18, 83: 19, 68: 20, 70: 21, 71: 22, 72: 23, 74: 24, 75: 25, 76: 26, 186: 27, 222: 28, 87: 3, 69: 4, 84: 5, 89: 6, 85: 7, 79: 8, 88: 9, 221: 10 }, km = {}; const noteTable = [ new NoteTableItem(28, 0, 44, 110, 54), new NoteTableItem(89, 0, 44, 110, 56), new NoteTableItem(150, 0, 44, 110, 58), new NoteTableItem(233, 0, 44, 110, 61), new NoteTableItem(303, 0, 44, 110, 63), new NoteTableItem(386, 0, 44, 110, 66), new NoteTableItem(447, 0, 44, 110, 68), new NoteTableItem(508, 0, 44, 110, 70), new NoteTableItem(590, 0, 44, 110, 73), new NoteTableItem(660, 0, 44, 110, 75), new NoteTableItem(743, 0, 44, 110, 78), new NoteTableItem(804, 0, 44, 110, 80), new NoteTableItem(866, 0, 44, 110, 82), new NoteTableItem(0, 0, 9, 188, 52), new NoteTableItem(9, 0, 51, 188, 53), new NoteTableItem(60, 0, 51, 188, 55), new NoteTableItem(111, 0, 51, 188, 57), new NoteTableItem(162, 0, 51, 188, 59), new NoteTableItem(213, 0, 51, 188, 60), new
@dkun7944
dkun7944 / ContentView.swift
Created July 31, 2023 03:36
AirDrop iOS 17 Swift.Shader Animation
//
// ContentView.swift
// Airdrop Demo
//
// Created by Daniel Kuntz on 7/30/23.
//
import SwiftUI
struct ContentView: View {
@kconner
kconner / macOS Internals.md
Last active May 11, 2025 05:13
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@smitelli
smitelli / ti250tool.py
Created May 31, 2022 19:51
Klein Tools TI250 image tool
# Klein Tools TI250 image tool by Scott Smitelli. Public domain.
# Requires at least Python 3.6 (developed and tested on 3.9)
# See https://www.scottsmitelli.com/articles/klein-tools-ti250-hidden-worlds
import argparse
import numpy as np
import re
import struct
from PIL import Image, ImageDraw
@joepie91
joepie91 / no-your-cryptocurrency-cannot-work.md
Last active March 20, 2025 04:34
No, your cryptocurrency cannot work

No, your cryptocurrency cannot work

Whenever the topic of Bitcoin's energy usage comes up, there's always a flood of hastily-constructed comments by people claiming that their favourite cryptocurrency isn't like Bitcoin, that their favourite cryptocurrency is energy-efficient and scalable and whatnot.

They're wrong, and are quite possibly trying to scam you. Let's look at why.

What is a cryptocurrency anyway?

There are plenty of intricate and complex articles trying to convince you that cryptocurrencies are the future. They usually heavily use jargon and vague terms, make vague promises, and generally give you a sense that there must be something there, but you always come away from them more confused than you were before.

@remi
remi / shc.js
Last active March 2, 2022 14:32
Extract JSON object from https://smarthealth.cards QR code
// Extract JSON payload from SHC QR code (without any kind of private/public key verification)
// Credits + inspiration
// https://github.com/dvci/health-cards-walkthrough/blob/main/SMART%20Health%20Cards.ipynb
// Usage
// $ node shc.js "shc:/01234569…"
const zlib = require("zlib");