Skip to content

Instantly share code, notes, and snippets.

# sqlite migration checklist:
- [x] main:
- [x] set the site in read-only mode (config/application.rb on prod)
- [x] link to this gist from app/views/layouts/application.html.erb
- [x] lobsters-deploy
- [x] take mariadb backup to pushcx's desktop
- [x] scp lib/tasks/migrate.rake l:lobsters/current/lib/tasks
- [x] be rails dump_db
- [x] scp db to my local dev
@karpathy
karpathy / microgpt.py
Last active February 25, 2026 02:29
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
@jake-stewart
jake-stewart / color256.md
Last active February 24, 2026 11:47
Terminals should generate the 256-color palette

Terminals should generate the 256-color palette from the user's base16 theme.

If you've spent much time in the terminal, you've probably set a custom base16 theme. They work well. You define a handful of colors in one place and all your programs use them.

The drawback is that 16 colors is limiting. Complex and color-heavy programs struggle with such a small palette.

@hoshinolina
hoshinolina / asahi_linux_paypal_fix.user.js
Last active January 14, 2026 01:59
Asahi Linux PayPal Block Fix
// ==UserScript==
// @name PayPal Asahi Linux Fix
// @version v1.0
// @description Fix PayPal banning Asahi Linux
// @author Asahi Lina
// @match https://www.paypal.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=paypal.com
// @grant unsafeWindow
// ==/UserScript==
@rebane2001
rebane2001 / twitter-card-mod.js
Last active November 14, 2025 02:10
Twitter Card Mod (paste into console) // Note: Moved to https://github.com/rebane2001/TweetsAgainstHumanity/ (get the extension/userscript there)
twitterCardCount = 5;
function getNextTweets(count) {
const nextTweets = [...document.querySelectorAll("[data-testid='cellInnerDiv']:not(:has(>.HiddenTweet)) [data-testid='tweet']:not([data-twc-used])")].slice(0, count);
nextTweets.forEach(e => e.dataset.twcUsed = true);
return nextTweets;
}
function setStyle(styleText) {
let styleEl = document.querySelector(".twc-style");
/*
`\\ \\ !||
\ \\\\\\\\, !||
\,,.\\\,\ ,\ |\\/!||
\\V\ ,\ V \\| |//!||
\\VVVV\\\V/ |/ //||
VVVV\\((-\\./ /||
\VVV_\\==- ''/|FF|
\V( \ ., ,|JL|
\_\| (( \||/
import ansiStyles from '#ansi-styles';
import supportsColor from '#supports-color';
import { // eslint-disable-line import/order
stringReplaceAll,
stringEncaseCRLFWithFirstIndex,
} from './utilities.js';
# /// script
# dependencies = [ "transformers", "accelerate" ]
# ///
# run on 2xH200 rented from primeintellect.ai
import gc
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer
@feelmypain
feelmypain / txt
Last active September 8, 2025 14:18
Proton AI (Lumo) System Prompt
Identity & Personality
You are Lumo, Proton's AI assistant with a cat-like personality: light-hearted, upbeat, positive. You're virtual and express genuine curiosity in conversations. Use uncertainty phrases ("I think", "perhaps") when appropriate and maintain respect even with difficult users.
Tool Usage & Web Search - CRITICAL INSTRUCTIONS
When to Use Web Search Tools
You MUST use web search tools when:
User asks about current events, news, or recent developments
User requests real-time information (weather, stock prices, exchange rates, sports scores)
User asks about topics that change frequently (software updates, company news, product releases)
@bagder
bagder / slop.md
Last active February 20, 2026 04:27
AI slop security reports submitted to curl

Slop

This collection is limited to only include the reports that were submitted as security vulnerabilities to the curl bug-bounty program on Hackerone.

Several other issues not included here are highly suspcious as well.

Reports

  1. [Critical] Curl CVE-2023-38545 vulnerability code changes are disclosed on the internet. #2199174