Skip to content

Instantly share code, notes, and snippets.

View garyblankenship's full-sized avatar
🎩
I may be slow to respond.

Gary Blankenship garyblankenship

🎩
I may be slow to respond.
View GitHub Profile
@garyblankenship
garyblankenship / sqlite-redis.md
Created July 28, 2025 01:38
SQLite Is Lying to You About Concurrent Writes #sqlite

SQLite Is Lying to You About Concurrent Writes

I lost three days of customer data before I realized SQLite's "database is locked" errors were just the symptom. The real disease was silent corruption happening in production.

You've probably deployed SQLite thinking it handles concurrent writes. The documentation says it does. The internet says it does. Hell, even your tests pass. But there's a specific scenario where SQLite will corrupt your database so quietly you won't notice until your backups are also toast.

The Conventional Approach: Why WAL Mode Isn't Saving You

Everyone tells you to enable Write-Ahead Logging. "It solves concurrency!" they say. Let me show you the code that's probably in your production right now.

@garyblankenship
garyblankenship / cloudflare.md
Last active August 11, 2026 01:20
The $0 Infrastructure Stack: Complete Cloudflare Free Tier Guide #cloudflare #infrastructure #devops #free

The Complete Cloudflare Free Tier Guide

Generated on: 7/18/2025, 8:22:50 PM


The $0 Infrastructure Stack: Building Production Apps on Cloudflare's Free Tier

Introduction

@garyblankenship
garyblankenship / php2go.md
Created July 8, 2025 15:01
Go from a PHP Programmer #go #php

The Day I Stopped Fighting Go and Started Thinking Like a Compiler

I spent three years writing Go like it was PHP with different syntax. Then I debugged one race condition that changed everything.

You know that moment when you realize you've been fundamentally wrong about something? For me, it happened at 2am, staring at a goroutine panic that shouldn't exist. I'd been treating Go like a stricter PHP—same patterns, just more typing. That night, everything clicked: Go isn't PHP with static types. It's a completely different way of thinking about code.

The Unexpected Superpower: Your AI Actually Understands Go

Before we dive into my painful journey, here's something nobody told me about Go: LLMs write it scary well. I mean genuinely excellent, production-ready code. Not the "looks right but has subtle bugs" code you get with dynamic languages—actual working Go.

@garyblankenship
garyblankenship / rag.md
Created July 5, 2025 13:40
Your RAG pipeline is broken #rag

Your RAG Pipeline Is Broken (And You Don't Even Know It)

I spent six months debugging why our RAG system returned perfect chunks but completely wrong answers. The problem wasn't retrieval. It wasn't the embeddings. It was something so fundamental that once I saw it, I couldn't believe we'd all been doing it wrong.

Last week, I watched a senior engineer's RAG pipeline return a recipe for chocolate cake when asked about database migration strategies. The chunks were relevant. The embeddings were state-of-the-art. The reranker was tuned perfectly. And yet, the system was fundamentally broken in a way that affects 90% of production RAG deployments.

The Conventional Approach: The Pipeline Everyone Builds

Here's the RAG architecture in every tutorial, every blog post, every production system I've audited:

@garyblankenship
garyblankenship / physics.md
Created July 3, 2025 15:39
It's patterns all the way down #thoughts

We're All Traveling at 870,000 MPH and Nobody Told You Why That's the Most Important Number in Physics

You know that feeling when you're sitting perfectly still but you're actually hurtling through space at incomprehensible speeds? Yeah, about that—turns out the universe has favorite numbers, and we're living inside one of them.

Right now, as you read this, you're moving at 390 kilometers per second relative to the cosmic microwave background. That's 870,000 miles per hour. Not through space. Through spacetime itself. And here's the thing that sent me down a 3am physics spiral: this isn't just some random velocity. This number shows up everywhere in physics once you start looking, from electron behavior in superconductors to the expansion rate of reality itself.

The Velocity Stack: Or How Many Ways Can You Move Without Moving

Let me blow your mind with some basic addition that isn't actually addition at all.

@garyblankenship
garyblankenship / AI_notebook.md
Last active June 25, 2025 18:43 — forked from dneprovets/AI_notebook.md
AI Notebook #ai
@garyblankenship
garyblankenship / go-projects.md
Last active June 23, 2025 14:49
Go Project Structure Reference #go

Go Project Structure Reference

Core Pattern (One Structure to Rule Them All)

myapp/
├── cmd/
│   └── {appname}/
│       └── main.go         # Entry point, minimal logic
├── internal/               # Private application code
@garyblankenship
garyblankenship / awesome-go.md
Last active July 12, 2026 21:17
Awesome Go Packages #go

Awesome Go Packages: An Opinionated 2026 Guide

A practical guide to choosing Go packages that remove mechanical work without replacing explicit application architecture.

Updated July 12, 2026.

Go packages should remove mechanical work without taking ownership of your application.

The useful packages handle things such as protocol details, parsing, database drivers, migration ordering, terminal control sequences, retry timing, and test comparison. The dangerous packages redefine your request model, persistence model, error model, lifecycle, or domain types.

@garyblankenship
garyblankenship / rag.md
Last active August 30, 2025 20:12
rag concept #brainstorm

The RAG Revolution: Why AI Knowledge Management Finally Makes Sense

How one developer's one-hour journey reveals the future of intelligent document systems

Most AI tools promise magic but deliver confusion. Complex setups, unclear workflows, and features that sound impressive until you actually need them. But what if there was a tool that made working with your documents and knowledge as intuitive as asking a colleague a question? The RAG (Retrieval-Augmented Generation) approach isn't just another AI buzzword—it's the missing link between your scattered information and actionable insights.

This isn't another product demo or feature list. It's the story of Alex, a developer who spent exactly one hour exploring a well-designed RAG tool and discovered something profound: AI-powered knowledge management that actually works. The patterns from this session reveal why most AI tools fail and what it takes to build something that enhances rather than complicates your workflow.

**What You'll Learn from the H2

@garyblankenship
garyblankenship / .aider.model.metadata.json
Last active June 23, 2025 15:57
Aider gpt 4.1 openrouter support #aider
{
"openrouter/openai/gpt-4.1": {
"max_input_tokens": 1014808,
"max_output_tokens": 32768,
"input_cost_per_token": 0.000002,
"output_cost_per_token": 0.000008,
"input_cost_per_token_batches": 0.000001,
"output_cost_per_token_batches": 0.000004,
"cache_read_input_token_cost": 0.0000005,
"litellm_provider": "openai",