Skip to content

Instantly share code, notes, and snippets.

View ubuntupunk's full-sized avatar
:octocat:
making coffee

DavDev Yes ubuntupunk

:octocat:
making coffee
View GitHub Profile
@ubuntupunk
ubuntupunk / deck-after.png
Last active October 9, 2026 08:09
Trope Cards issue #9 verification screenshots
deck-after.png
export $(cat .env.local | grep -v '^#' | xargs) && pnpm tsx scripts/seed-drizzle.ts
export && pnpm tsx scripts/seed-drizzle.ts
if [ -f /usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf ]; then cp /usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf infrastructure/backend/fonts/; echo "Font copied"; else echo "Font not found, will need to download"; fi
@ubuntupunk
ubuntupunk / microgpt.py
Created February 19, 2026 16:48 — forked from karpathy/microgpt.py
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
@ubuntupunk
ubuntupunk / awkmap.md
Last active October 1, 2025 06:11
nmap with awk output

nmap -v -sn 192.168.10/25 -oG - | awk '/Up$/{print $2}'

nmap Options Explained

nmap: The network mapper tool, used for scanning hosts and networks.

-v: Enables verbose output, giving more detail during the scan.

-sn: Stands for "ping scan" — it disables port scanning and only checks which hosts are up (i.e., responding to ping or ARP).

pdftk A='input.pdf' cat A01-20 output output_01_20.pdf
gi() {
local query="$@"
local url="https://www.toptal.com/developers/gitignore/api/$query"
local result
# Fetch the .gitignore template
result=$(curl -sL "$url" 2>&1)
if [[ $? -ne 0 ]]; then
echo "Error: Failed to fetch data from $url (network or curl issue)."
return 1
@ubuntupunk
ubuntupunk / .vimrc
Last active July 29, 2025 10:05
Portable Lightweight VIMRC
set nocompatible " Disable vi compatibility
filetype plugin indent on " Enable filetype detection
syntax on " Enable syntax highlighting
set mouse=r " Enable mouse copy-paste, navigation
set clipboard=unamedplus " Enable clipboard
" Colorscheme and appearance
colorscheme desert " Clean, attractive colorscheme
set background=dark " Dark background for better contrast
set number " Show line numbers
** Using a shell function in your .bashrc (recommended approach):
```bash
findgrep() {
find . -type f -exec grep -l "$1" {} \;
}
```
*** Or even simpler, you can use grep -r directly (more efficient):
```bash