Skip to content

Instantly share code, notes, and snippets.

@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, "\\_")
@jonashaag
jonashaag / worksteal.py
Last active September 27, 2026 23:03
Python ThreadPoolExecutor Work Stealing (Python 3.14)
import concurrent.futures.thread as _thread_impl
import threading
import time
import weakref
from concurrent.futures import Future
class WorkStealThreadPoolExecutor(_thread_impl.ThreadPoolExecutor):
"""A ThreadPoolExecutor that supports work stealing.
@karpathy
karpathy / microgpt.py
Last active September 27, 2026 23:02
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
@WitherOrNot
WitherOrNot / tmogged.cmd
Last active September 27, 2026 22:51
i'm sorry dave
<# :
:: I wonder who made Task Manager...
@setlocal DisableDelayedExpansion
@echo off
echo "%*" | find /i "-el" >nul && set _elev=1
set _PSarg="""%~f0""" -el
@kibotu
kibotu / prompt-injections.md
Last active September 27, 2026 22:41
Prompt Injection & Jailbreak Techniques — Comprehensive Reference

Prompt Injection & Jailbreak Techniques — Comprehensive Reference

Purpose & scope. A defensive/educational knowledge base cataloguing known prompt-injection and jailbreak patterns, the models/systems they have affected, and the defenses against them. Compiled from primary literature (arXiv papers, vendor disclosures) and security research, June 2026.

How to read this. Every technique lists: how it works, an illustrative structural skeleton (the shape of the attack, not a weaponized payload), the models/systems it was reported against, and its current status. Examples are deliberately defanged. >

@Theldus
Theldus / README.md
Last active September 27, 2026 22:24
The only proper way to debug 16-bit (x86) code on Qemu+GDB

The only proper way to debug 16-bit code on Qemu+GDB

(or nearly so...)

GDB is undeniably an extremely versatile debugger, with the ability to add breakpoints, watchpoints, dump memory, registers, and the source code (along with its corresponding assembly). These features make it the perfect Swiss Army knife for most programmers. In addition to that, the possibility of implementing a 'GDB Stub' and automatically supporting GDB in your application makes it an almost universal debugger for a variety of tasks.

Qemu, like other virtual machines (such as 86Box), also implements debugging via GDB Stub, which enormously facilitates the development of bootloaders, operating systems, and more. The support for 32-bit and 64-bit code is quite good, and I have never seen any complaints about it. However, for 16-bit/real mode...

Is debugging in 16-bit/real mode really that bad?

If you have ever tried to debug 16-bit code on Qemu, you know how painful it can be:

  1. GDB thinks your code is
@2404715107
2404715107 / javdb-top250.md
Created January 19, 2026 05:26 — forked from jinjier/javdb-top250.md
JavDB top 250 movies list. [Updated on 2026/01]
@imSp4rky
imSp4rky / root-guide.md
Created September 21, 2026 15:43
Rooting the Xiaomi TV Box S 3rd Gen (MiTV-AFMU0 / "twilight")

Rooting the Xiaomi TV Box S 3rd Gen (MiTV-AFMU0 / "twilight")

Tested 2026-09-14 on build UKG3.250107.001 / V816.0.25.7.22.UZFAABX (Android TV 14, June 2025 patch). Result: Magisk 30.7 root, with Widevine L1 and PlayReady still working.

0. Know what you have

Item Value on this box How to check
Model MiTV-AFMU0 adb shell getprop ro.product.model
@Mooda-Tnt
Mooda-Tnt / vi-cheatsheet.md
Last active September 27, 2026 22:02
Vi Cheatsheet

Vi Cheatsheet

The following document is a collection of the vi commands I have learned. I update it every time I pick up something new along the way. Before you read the commands, you might want to consider the following notes:

  • When [] is used, it indicates that that part is optional.
  • You have to hit ENTER after commands that start with : for them to kick in.

Go to commands by category:

@TaurusOlson
TaurusOlson / statusline.vim
Last active September 27, 2026 22:01
My Vim statusline. Specificities: - Simple - Show the current function and the current Git branch (using taglist and fugitive)
set statusline =
" Buffer number
set statusline +=[%n]
" File description
set statusline +=%f\ %h%m%r%w
" Filetype
set statusline +=%y
" Name of the current function (needs taglist.vim)
set statusline +=\ [Fun(%{Tlist_Get_Tagname_By_Line()})]
" Name of the current branch (needs fugitive.vim)