Skip to content

Instantly share code, notes, and snippets.

View Benexl's full-sized avatar
:electron:
dissecting reality

Benedict Xavier Benexl

:electron:
dissecting reality
View GitHub Profile
@karpathy
karpathy / microgpt.py
Last active November 26, 2026 09:41
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

Beast Mode

Beast Mode is a custom chat mode for VS Code agent that adds an opinionated workflow to the agent, including use of a todo list, extensive internet research capabilities, planning, tool usage instructions and more. Designed to be used with 4.1, although it will work with any model.

Below you will find the Beast Mode prompt in various versions - starting with the most recent - 3.1

Installation Instructions

  • Go to the "agent" dropdown in VS Code chat sidebar and select "Configure Modes".
  • Select "Create new custom chat mode file"
@zanbaldwin
zanbaldwin / README.md
Last active September 5, 2026 00:10
Onefetch Git Information on `cd`

Show Git Information when cding into a Git repository

  1. Install onefetch by either:
    • Compiling it from scratch using the Rust compiler, Cargo: with the command cargo install onefetch
    • Downloading a pre-built binary from Onefetch's GitHub releases page (recommended) and placing it in your $PATH (such as /usr/local/bin/onefetch).
  2. Add the snippet listed in onefetch_on_cd.sh to whatever file that gets run whenever you start a new Bash session. This differs per distro but common files include:
    • ~/.bashrc
    • ~/.bash_profile
    • sometimes ~/.bash_aliases?
@bitingsock
bitingsock / ytdl-preload.lua
Last active August 20, 2026 19:22
Precache the next entry in your playlist if it is a network source by downloading it to a temp file ahead of time. Change Line 20 to temp directory. It will delete the directory on exit.
----------------------
-- #example ytdl_preload.conf
-- # make sure lines do not have trailing whitespace
-- # ytdl_opt has no sanity check and should be formatted exactly how it would appear in yt-dlp CLI, they are split into a key/value pair on whitespace
-- # at least on Windows, do not escape '\' in temp, just us a single one for each divider
-- #temp=R:\ytdltest
-- #ytdl_opt1=-r 50k
-- #ytdl_opt2=-N 5
-- #ytdl_opt#=etc
@fnky
fnky / ANSI.md
Last active November 23, 2026 22:38
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active November 19, 2026 08:30
Hyperlinks in Terminal Emulators
@ChrisK2
ChrisK2 / ls_hook.lua
Created November 10, 2014 18:28
Get mpv master/HEAD with lua, livestreamer in $PATH, put in ~/.config/mpv/scripts ... you know the drill.
local utils = require 'mp.utils'
local msg = require 'mp.msg'
local ls = {
path = "livestreamer",
}
mp.add_hook("on_load", 9, function ()
local function exec(args)