Skip to content

Instantly share code, notes, and snippets.

View VladSez's full-sized avatar
🍳

Vlad Sazonau VladSez

🍳
View GitHub Profile
@karpathy
karpathy / microgpt.py
Last active February 13, 2026 16:57
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
"workbench.editor.customLabels.enabled": false,
"workbench.editor.customLabels.patterns": {
"**/page.*": "${dirname}.${extname}",
"**/layout.*": "${dirname}/layout.${extname}",
"**/default.*": "${dirname}/default.${extname}",
"**/error.*": "${dirname}/error.${extname}",
"**/forbidden.*": "${dirname}/forbidden.${extname}",
"**/instrumentation.*": "${dirname}/instrumentation.${extname}",
"**/instrumentation-client.*": "${dirname}/instrumentation-client.${extname}",
"**/loading.*": "${dirname}/loading.${extname}",
@jediahkatz
jediahkatz / SKILL.md
Created January 23, 2026 20:25
Cursor skill for capturing learnings from conversations into reusable skills
name description
capture-skill
Capture learnings, patterns, or workflows from the current conversation into a new or existing skill. Use when the user wants to save what was learned, discovered, or built during a conversation as a reusable skill for future sessions.

Capture Skill from Conversation

This skill helps you extract knowledge, patterns, and workflows from the current conversation and persist them as a reusable skill.

When to Use

@hackermondev
hackermondev / writeup.md
Last active February 11, 2026 12:03
How we pwned X (Twitter), Vercel, Cursor, Discord, and hundreds of companies through a supply-chain attack

hi, i'm daniel. i'm a 16-year-old high school senior. in my free time, i hack billion dollar companies and build cool stuff.

about a month ago, a couple of friends and I found serious critical vulnerabilities on Mintlify, an AI documentation platform used by some of the top companies in the world.

i found a critical cross-site scripting vulnerability that, if abused, would let an attacker to inject malicious scripts into the documentation of numerous companies and steal credentials from users with a single link open.

(go read my friends' writeups (after this one))
how to hack discord, vercel, and more with one easy trick (eva)
Redacted by Counsel: A supply chain postmortem (MDL)

Bank‑Based Anonymous Age Verification (BAV)

A zero‑storage, privacy‑preserving age check that leverages banks’ existing KYC — with the user as the transport layer.


TL;DR

  • Banks sign an age claim, not an identity. They never learn which site you’re visiting.
  • Merchants verify a short‑lived token against their own nonce and a one‑time WebAuthn key. No database required.
@leerob
leerob / agent.py
Created July 30, 2025 23:14
agent.py
import os
import json
import subprocess
from anthropic import Anthropic
# Tool definitions
TOOLS = [
{
"name": "list_files",
"description": "List files and directories at a given path",
@sachinraja
sachinraja / browser.ts
Created July 18, 2025 21:53
browser-in-sandbox
import { Sandbox } from "@vercel/sandbox";
import z from 'zod';
import { chromium } from 'playwright'
export async function retryWithBackoff<T>(fn: () => Promise<T>, retries = 3) {
let delay = 1000;
for (let i = 0; i < retries; i++) {
try {
return await fn();
} catch {
@rebane2001
rebane2001 / glass-with-controls.html
Last active December 14, 2025 05:53
glass effect test css/svg thing (messy) - demo: https://codepen.io/rebane2001/details/OPVQXMv
<div style="position:absolute;top:-999px;left:-999px">
<svg
id="effectSvg"
width="200"
height="200"
viewBox="0 0 200 200"
xmlns="http://www.w3.org/2000/svg">
<filter id="displacementFilter4">
@arch1t3cht
arch1t3cht / video_noob_guide.md
Last active February 13, 2026 16:56
What you NEED to know before touching a video file

What you NEED to Know Before Touching a Video File

Hanging out in subtitling and video re-editing communities, I see my fair share of novice video editors and video encoders, and see plenty of them make the classic beginner mistakes when it comes to working with videos. A man can only read "Use Handbrake to convert your mkv to an mp4 :)" so many times before losing it, so I am writing this article to channel the resulting psychic damage into something productive.

If you are new to working with videos (or, let's face it, even if you aren't), please read through this guide to avoid making mistakes that can cost you lots of time, computing power, storage space, or video quality.

@pontusab
pontusab / proximity-prefetch.tsx
Created April 6, 2025 06:43
Next.js Proximity Prefetch (PPF)
"use client";
import { useRouter } from "next/navigation";
import type { ReactNode } from "react";
import { useCallback, useEffect, useState } from "react";
interface ProximityPrefetchProps {
children: ReactNode;
threshold?: number;
predictionInterval?: number;