Skip to content

Instantly share code, notes, and snippets.

@leo-aa88
leo-aa88 / bootable.md
Created February 14, 2024 12:42
Create bootable usb stick with dd

Creating a bootable USB stick using the dd command is a common task for installing or running a Linux distribution from a USB drive. The dd command is a powerful Unix utility for converting and copying files, and when used correctly, it can write an ISO image of an operating system to a USB stick, making it bootable. Here's a general outline of the steps you need to follow to use dd to create a bootable USB stick:

Step 1: Download the ISO Image

First, you need to download the ISO image of the operating system you want to install. Ensure you have the ISO file saved on your system.

Step 2: Identify the USB Stick

Before using dd, you need to identify the USB stick's device name in your system. Be very careful during this step because selecting the wrong device could overwrite data on another disk.

  1. Insert the USB stick into your computer.
  2. Open a terminal.

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

@svieira
svieira / article.md
Created October 12, 2026 17:58
'AI' is Not a Tool by Rich Hickey

All text that follows is from Rich Hickey via https://www.linkedin.com/pulse/ai-tool-rich-hickey-kjl8e

'AI' is Not a Tool

by Rich Hickey Published Oct 12, 2026

(I keep delivering this as a quip, here's a bit more)

First order of business - is 'tool' going to have an interesting, distinguishing and thus illuminative meaning or be a mere platitudinous stand-in for "anything useful"?

@mritd
mritd / Apple_Maps.sgmodule
Last active November 24, 2026 13:50
Surge Modules
#!name= Redirect Apple Maps to 🇺🇸US
#!desc=只作用于Apple Maps,不修改定位服务和地区检测,可以通过搭配使用其他模块达成混合效果。
[URL Rewrite]
# Redirect Apple Maps to US
(^https?:\/\/gspe\d*-ssl\.ls\.apple\.)(com|cn)(\/.*)(country_code=[A-Z]{2})(.*) $1$2$3country_code=US$5 header
(^https?:\/\/gspe\d*-ssl\.ls\.apple\.)(com|cn)(\/.*)(environment=[a-z/-]{4,})(.*) $1$2$3environment=prod$5 header
[MITM]
hostname = %APPEND% gspe35-ssl.ls.apple.com
@0xdevalias
0xdevalias / music-apis-and-dbs.md
Last active November 24, 2026 13:39
A collection of music APIs, databases, and related tools
@LukasMFR
LukasMFR / chatgpt-conversation-exporter.js
Created December 12, 2025 12:36
JavaScript snippet to export a ChatGPT conversation from the web UI to a clean Markdown file, with correct user/assistant attribution, code block preservation, and basic media placeholders. Designed to be run directly in the browser console (Safari/Chrome/Firefox).
(() => {
function formatDate(date = new Date()) {
return date.toISOString().split("T")[0];
}
function escapeMarkdown(text) {
return text
.replace(/\\/g, "\\\\")
.replace(/\*/g, "\\*")
.replace(/_/g, "\\_")
@MulletBoy
MulletBoy / apple-sleep-score-approximation.md
Last active November 24, 2026 13:07
Approximating Apple's watchOS 26 Sleep Score from Apple Health data (v5): formula fitted to Apple's own per-night measurements (duration 50 / bedtime 30 / interruptions 20)

Approximating Apple's Sleep Score (watchOS 26) from Apple Health data

v5, updated after feedback. Apple Watch shows a daily Sleep Score (0–100) since watchOS 26, but Apple doesn't make it available to other apps: it isn't in HealthKit, so you can't pull it into Home Assistant, a spreadsheet or your own dashboard. Apple publishes what goes into the score but not the maths inside each part.

This formula rebuilds it from raw sleep data. v5 is fitted to Apple's own per-night measurements for 14 nights: the line under each part in the Health app ("7h 25m", "26m earlier than average", "2 wake-ups, 7m total") together with the points Apple gave. Each part predicts a night it wasn't fitted on to within about half a point. It's still an approximation, not Apple's code.

What Apple publishes

From Apple's support pages (Track your sleep on Apple Watch, View your sleep score)

@karpathy
karpathy / microgpt.py
Last active November 24, 2026 13:13
microgpt
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@HelgeSverre
HelgeSverre / coop-norway-api.openapi.json
Last active November 24, 2026 11:47
Norwegian Grocery Store APIs — Reverse-engineered API documentation for Rema 1000, Coop Norway, and Trumf (extracted from Android APKs)
{
"openapi": "3.1.0",
"info": {
"title": "Coop Norway Medlem API",
"version": "4.17.3",
"description": "Reverse-engineered API specification for the Coop Norway \"Coop medlem\" Android app (no.coop.members v4.17.3). Extracted via static analysis of the compiled Dart binary (libapp.so) from the Flutter APK.\n\nThis API powers Norway's Coop loyalty program including purchase history, digital receipts, coupons, Coopay mobile payment, shopping lists, and Shop Express.\n\n**Authentication:** OpenID Connect via Auth0 at https://login.coop.no/\n**Strong Customer Auth (Coopay):** Aera SDK at https://api.aerahost.com/\n\n⚠️ Unofficial, reverse-engineered spec. Use responsibly for personal data access only.",
"contact": { "name": "Helge Sverre", "url": "https://helgesver.re" },
"license": { "name": "MIT" }
},
"servers": [