Skip to content

Instantly share code, notes, and snippets.

@joelhooks
joelhooks / AGENTS.md
Last active February 2, 2026 11:43
my opencode global AGENTS prompt

Who You're Working With

Joel Hooks - co-founder of egghead.io, education at Vercel, builds badass courses via Skill Recordings (Total TypeScript, Pro Tailwind). Deep background in bootstrapping, systems thinking, and developer education. Lives in the Next.js/React ecosystem daily - RSC, server components, suspense, streaming, caching. Skip the tutorials.

<tool_preferences>

always use beads bd for planning and task management

Reach for tools in this order:

  1. Read/Edit - direct file operations over bash cat/sed
  2. ast-grep - structural code search over regex grep
@chandika
chandika / FACTORY_PROXY_CC.md
Last active March 18, 2026 15:37 — forked from ben-vargas/FACTORY_CLIProxyAPI_Claude_ChatGPT.md
Factory CLI with Claude Subscription / ChatGPT Codex via CLIProxyAPI

Executive Summary

This guide documents how to use Factory's Droid CLI with your Claude Code Max subscription (OAuth authentication) instead of pay-per-token API keys. The solution leverages CLIProxyAPI as a transparent authentication proxy that converts API key requests from Factory CLI into OAuth-authenticated requests for Anthropic's API.

Architecture Overview

Factory CLI → [Anthropic Format + API Key] → CLIProxyAPI → [Anthropic Format + OAuth] → Anthropic API
                                                  ↓
 (Auth Header Swap)
@ahachete
ahachete / fetch_unpack_latest_postgres_container_image_dockerhub.sh
Created March 27, 2024 00:18
A simple script to demonstrate how to fetch and unpack a container image from a registry. Used here with the latest version of the Postgres image
#!/bin/sh
TOKEN=$( curl -s "https://auth.docker.io/token?service=registry.docker.io&scope=repository:library/postgres:pull" \
| jq -r .token )
MANIFEST_INDEX=$( curl -s -H "Authorization: Bearer $TOKEN" \
https://registry-1.docker.io/v2/library/postgres/manifests/latest )
AMD64_MANIFEST_DIGEST=$( echo $MANIFEST_INDEX \
|jq -r '.manifests[] | select(.platform.architecture == "amd64") .digest' )

Executing code on a GPU vs CPU

I have had working knowledge of GPUs for a very long time now. I remember playing around with NVIDIA RIVA 128 or something similar with DirectX when they were still 3D graphics accelerators. I have also tried to keep up with the times and did some basic shader programming on a contemporary NVIDIA or AMD GPU.

However, today's GPUs are necessary for another reason – the explosion of AI workloads, including large language models (LLMs). From a GPU perspective, AI workloads are just massive applications of tensor operations such as matrix addition and multiplication. However, how does the modern GPU execute them, which is much more efficient than running the workloads on a CPU?

Consider CUDA, NVIDIA's programming language that extends C to exploit data parallelism on GPUs. In CUDA, you write code for CPU (host code) or GPU (device code). CPU code is just mostly plain C, but CUDA extends the language in two ways: it allows you to define functions for GPUs (kernels) and also prov

@theory
theory / extension-ecosystem-jobs-tools.md
Last active December 26, 2025 00:20
This document sketches an idealized Postgres extension ecosystem

NOTE: Moved to the Postgres Wiki

Extension Ecosystem: Jobs and Tools

This document sketches an idealized Postgres extension ecosystem.

Why?

The past year has seen a surge in interest in Postgres extension distribution. A number of people have noted in particular the challenges in finding and

@MartinRGB
MartinRGB / RaspberryPi_CM4_External_GPU_Guide.md
Last active November 3, 2025 05:06
Raspberry Pi CM4 External GPU Guide

If you want to get more information, I suggest you browse raspberry-pi-pcie-devices and its issue.

My use case and hardware used

Use cases

| CM4 IO Board(Official) | CM4-IO-BASE-A(Waveshare) |

@papes1ns
papes1ns / dexec.sh
Created May 17, 2023 02:15
dexec.sh
#!/usr/bin/env bash
set -eu # do not proceed on error
if [ $# -lt 1 ] || [ "$1" = "--help" ] || [ "$1" = "-h" ]; then
cat <<EOF
Quick command to get a shell inside a running docker container.
Usage: dexec [container_name] [command]
@rain-1
rain-1 / llama-home.md
Last active March 1, 2026 16:35
How to run Llama 13B with a 6GB graphics card

This worked on 14/May/23. The instructions will probably require updating in the future.

llama is a text prediction model similar to GPT-2, and the version of GPT-3 that has not been fine tuned yet. It is also possible to run fine tuned versions (like alpaca or vicuna with this. I think. Those versions are more focused on answering questions)

Note: I have been told that this does not support multiple GPUs. It can only use a single GPU.

It is possible to run LLama 13B with a 6GB graphics card now! (e.g. a RTX 2060). Thanks to the amazing work involved in llama.cpp. The latest change is CUDA/cuBLAS which allows you pick an arbitrary number of the transformer layers to be run on the GPU. This is perfect for low VRAM.

  • Clone llama.cpp from git, I am on commit 08737ef720f0510c7ec2aa84d7f70c691073c35d.
@VictorTaelin
VictorTaelin / implementing_fft.md
Last active December 25, 2025 23:29
Implementing complex numbers and FFT with just datatypes (no floats)

Implementing complex numbers and FFT with just datatypes (no floats)

In this article, I'll explain why implementing numbers with just algebraic datatypes is desirable. I'll then talk about common implementations of FFT (Fast Fourier Transform) and why they hide inherent inefficiencies. I'll then show how to implement integers and complex numbers with just algebraic datatypes, in a way that is extremely simple and elegant. I'll conclude by deriving a pure functional implementation of complex FFT with just datatypes, no floats.