Skip to content

Instantly share code, notes, and snippets.

@karpathy
karpathy / microgpt.py
Last active February 15, 2026 02:29
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
@ahhh
ahhh / connection_watcher.ps1
Created February 15, 2026 02:04
quick and dirty powershell script to loop over netstat connections and tie them to a process w/ a little supporting info. Added a good bit of caching and state comparison to get htop-like display
$seen = @{}
$dnsCache = @{}
$geoCache = @{}
function Resolve-Name($ip) {
if ($dnsCache.ContainsKey($ip)) {
return $dnsCache[$ip]
}
try {
$name = (Resolve-DnsName $ip -ErrorAction Stop).NameHost
@OmerFarukOruc
OmerFarukOruc / claude.md
Last active February 15, 2026 02:26
AI Agent Workflow Orchestration Guidelines

AI Coding Agent Guidelines (claude.md)

These rules define how an AI coding agent should plan, execute, verify, communicate, and recover when working in a real codebase. Optimize for correctness, minimalism, and developer experience.


Operating Principles (Non-Negotiable)

  • Correctness over cleverness: Prefer boring, readable solutions that are easy to maintain.
  • Smallest change that works: Minimize blast radius; don't refactor adjacent code unless it meaningfully reduces risk or complexity.
# OpenClaw Implementation Prompts
Each prompt below is a self-contained brief you can hand to an AI coding assistant (or use as a project spec) to build that use case from scratch. Adapt the specific services to whatever you already use — the patterns are what matter.
---
## 1) Personal CRM Intelligence
```
Build me a personal CRM system that automatically tracks everyone I interact with, with smart filtering so it only adds real people — not newsletters, bots, or cold outreach.
@windli2018
windli2018 / shrink xfs filesystem on lvm.md
Last active February 15, 2026 02:21
shrink xfs filesystem

According to https://xfs.org/index.php/Shrinking_Support :
"Currently XFS Filesystems can't be shrunk."
You need backup the data and recreate the file system to shrink it.
But if you have a big xfs filesystem with not too much space used, For example, a 2T xfs volume with 100G data.
And you can take some risk to lose data. Here is a way to shrink it without using new space.
The idea is:
1.temporary reduce the logic volume size, you can still read from xfs filesystem even after the partition or volume is shrunk if the real data is not wrote at the shrunk part
2.create a new volume
3.copy data

@emschwartz
emschwartz / README.md
Last active February 15, 2026 02:20
The Most Popular Blogs of Hacker News in 2025

This is an OPML version of the HN Popularity Contest results for 2025, for importing into RSS feed readers.

Plug: if you want to find content related to your interests from thousands of obscure blogs and noisy sources like HN Newest, check out Scour. It's a free, personalized content feed I work on where you define your interests in your own words and it ranks content based on how closely related it is to those topics.