Skip to content

Instantly share code, notes, and snippets.

@karpathy
karpathy / microgpt.py
Last active February 22, 2026 09:28
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
export default {
async email(message, env, ctx) {
// 1. 配置
const FORWARD_TO = "your_real_email@gmail.com";
// 2. 基础信息
const subject = message.headers.get("subject") || "无主题";
const from = message.from;
// 3. 获取并“清洗”数据
blueprint:
name: Leak detection & notifier
description: Send a notification when any configured moisture sensor becomes moist
domain: automation
input:
notify_device:
name: Notify device
description: "The device where the notification should be sent to."
selector:
device:
@eryabyshev
eryabyshev / docker_ubuntu_24_04.md
Created November 17, 2025 20:04
Установка Docker на Ubuntu 24.04

1. Обновляем систему

sudo apt update
sudo apt upgrade -y

2. Удаляем старые версии Docker (если были)

@velvet-shark
velvet-shark / openclaw-50-day-prompts.md
Last active February 22, 2026 09:14
OpenClaw after 50 days: all prompts for 20 real workflows (companion to YouTube video)

OpenClaw after 50 days: all prompts

Companion prompts for the video: OpenClaw after 50 days: 20 real workflows (honest review)

These are the actual prompts I use for each use case shown in the video. Copy-paste them into your agent and adjust for your setup. Most will work as-is or the agent will ask you clarifying questions.

Each prompt describes the intent clearly enough that the agent can figure out the implementation details. You don't need to hand-hold it through every step.

My setup: OpenClaw running on a VPS, Discord as primary interface (separate channels per workflow), Obsidian for notes (markdown-first), Coolify for self-hosted services.

@badlogic
badlogic / compaction.md
Created December 2, 2025 14:11
Context Compaction Research: Claude Code, Codex CLI, OpenCode, Amp

Context Compaction

Research on how other coding assistants implement context compaction to manage long conversations.

Overview

Context compaction (also called "handoff" or "summarization") is a technique to manage the context window in long coding sessions. When conversations grow too long, performance degrades and costs increase. Compaction summarizes the conversation history into a condensed form, allowing work to continue without hitting context limits.

Claude Code

Add-Type -AssemblyName System.Windows.Forms
Add-Type -AssemblyName System.Drawing
# ============================================
# MAIN FORM
# ============================================
$form = New-Object System.Windows.Forms.Form
$form.Text = "Network Speed Monitor"
$form.Size = New-Object System.Drawing.Size(450, 380)
$form.StartPosition = "CenterScreen"
@yanonono
yanonono / VRC_PhotoSelector_v111.ps1
Last active February 22, 2026 08:38
VRChatで撮影した写真をワールドごとのフォルダに選別します
$originalDebugPreference = $DebugPreference
$DebugPreference = "SilentlyContinue" # Continue SilentlyContinue
### read setting.json file
set-variable -name SETTING_JSON_FILE -value ".\setting.json" -option constant
if (Test-Path $SETTING_JSON_FILE) {
$settingJson = ConvertFrom-Json -InputObject (Get-Content $SETTING_JSON_FILE -Encoding UTF8 -Raw)
}
else {
$settingJson = [PSCustomObject] @{