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 / 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 June 23, 2025 15:40
Awesome Go Packages #go

The Actually Useful Go Package List: An Opinionated Guide

Stop googling "best Go web framework" at 2am. I've done it for you.

This isn't another list of GitHub stars. This is what you actually need to know: which packages to use, when to use them, and what choosing them says about your project. Every opinion here comes from production scars.

Web Frameworks: The Big Three (And Why There's Only Three)

Gin - The Default Choice

When to use: You're building an API and want to ship this week

@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",
@garyblankenship
garyblankenship / aider-gh.md
Last active June 23, 2025 15:57
Aider with Github CLI #aider

Working with GitHub Issues in Aider

This tutorial shows how to use Aider's /run command to work with GitHub issues using the GitHub CLI.

Prerequisites

  • GitHub CLI (gh) installed and authenticated
  • Aider installed
  • A GitHub repository with issues
@garyblankenship
garyblankenship / pb_blueprint.go
Last active June 23, 2025 15:58
PocketBase Blueprint #go
package main
import (
"bytes"
"encoding/json"
"flag"
"fmt"
"io"
"io/ioutil"
"log"