Skip to content

Instantly share code, notes, and snippets.

@karpathy
karpathy / microgpt.py
Last active February 14, 2026 02:37
microgpt
"""
The most atomic way to train and inference 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
@shehbajdhillon
shehbajdhillon / adb-tailscale-android-use.md
Last active February 7, 2026 12:36
Setup guide for letting AI agents (Claude Code, Cursor, etc.) control your Android remotely via ADB + Tailscale

ADB over Tailscale

Securely connect to Android over the internet using ADB + Tailscale.

You can also copy paste this gist into your agent of choice and have it explain you what to do.

This guide sets up remote ADB access so you can run android-use — an agent skill that lets AI interact with your Android device over ADB.


@bullishpip
bullishpip / claude-code-vscode-sidebar-setup.md
Last active February 10, 2026 15:50
Adding Claude-Code Visual Studio Code extension to Chat Panel

How to Configure Claude Code Extension in Visual Studio Code Side Panel

Last Updated: October 7, 2025
Extension Version Tested: Claude Code for VS Code v2.0.10

This guide will help you set up the Claude Code extension in Visual Studio Code's side panel for easy access. You can also use this process for other chat extentions like Codex.

Prerequisites

@amirilovic
amirilovic / take-memory-snapshot.ts
Created July 15, 2024 20:46
A script that takes a heap snapshot from a nodejs process in debug mode
const { exec, spawn } = require("child_process");
const fs = require("fs");
const { promisify } = require("util");
import { WebSocket } from "ws";
async function getWebSocketDebuggerUrl() {
const res = await fetch("http://localhost:9229/json");
const data = await res.json();
return data[0].webSocketDebuggerUrl;
}
import java.time.Duration;
import java.util.List;
import java.util.concurrent.locks.ReentrantLock;
import java.util.stream.IntStream;
import java.util.stream.Stream;
/**
* Demonstrate potential for deadlock on a {@link ReentrantLock} when there is both a synchronized and
* non-synchronized path to that lock, which can allow a virtual thread to hold the lock, but
* other pinned waiters to consume all the available workers.
<script>
var module = WebAssembly.instantiateStreaming(fetch("linked_list.wasm"), {});
</script>
@da-tubi
da-tubi / ElvishScriptingBasics.md
Last active August 22, 2023 08:00
Elvish Scripting Basics

Elvish Scripting Basics

Assignment and Substitution

var a = 375
set a = 376

var hello = $a

Variables

@steve981cr
steve981cr / How-to-Release-an-Electron-App-on-the-Microsoft-Store.md
Last active December 14, 2025 10:37
Step by step instructions on how to release an Electron app on the Microsoft Store. Uses Electron-builder to package the app.
@steve981cr
steve981cr / How-to-Release-an-Electron-App-on-the-Mac-App-Store.md
Last active December 9, 2025 06:48
Step by step instructions on how to release an Electron app on the Mac App Store. Uses Electron-builder to package the app.