Skip to content

Instantly share code, notes, and snippets.

@thesamesam
thesamesam / xz-backdoor.md
Last active April 18, 2024 21:45
xz-utils backdoor situation (CVE-2024-3094)

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

This is still a new situation. There is a lot we don't know. We don't know if there are more possible exploit paths. We only know about this one path. Please update your systems regardless.

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.

@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 April 19, 2024 20:06
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 April 13, 2024 03:21
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");
@RhetTbull
RhetTbull / vision.py
Last active April 3, 2024 17:49
Use Apple's Vision framework from Python to detect text in images
""" Use Apple's Vision Framework via PyObjC to detect text in images
To use:
python3 -m pip install pyobjc-core pyobjc-framework-Quartz pyobjc-framework-Vision wurlitzer
"""
import pathlib
@lorey
lorey / selenium_xhr_requests_via_performance_logging.py
Last active April 14, 2024 09:11
Access Chrome's network tab (e.g. XHR requests) with Selenium
#
# This small example shows you how to access JS-based requests via Selenium
# Like this, one can access raw data for scraping,
# for example on many JS-intensive/React-based websites
#
from time import sleep
from selenium import webdriver
from selenium.webdriver import DesiredCapabilities