Skip to content

Instantly share code, notes, and snippets.

View productdevbook's full-sized avatar
🖥️
Learning

Wind productdevbook

🖥️
Learning
View GitHub Profile
@productdevbook
productdevbook / from-a-gallery-bug-to-google-cloud-org-policies.md
Created June 27, 2026 19:01
From a gallery bug to Google Cloud org policies — debugging an AI image feature end to end (Gemini → Vertex AI → Cloudflare AI Gateway)
@productdevbook
productdevbook / The Expo SDK 56 dyld crash that wasn't a build problem.md
Last active June 26, 2026 14:33
The Expo SDK 56 dyld crash that wasn't a build problem — three copies of react-native-worklets, one app

An Expo SDK 56 launch crash that turned out to be three copies of one library

My iOS app started crashing the moment it launched. No JS error, no red screen, just a native abort before anything rendered. TestFlight, local device builds, simulator, all the same.

The crash log:

dyld: Symbol not found: ExpoModulesCore.AnyModule._exposedDefinition()
  Referenced from: ExpoFont.framework (and ExpoLocation.framework)
 Expected in: ExpoModulesCore.framework
@productdevbook
productdevbook / self-hosted-macos-runner-isolation.md
Created June 17, 2026 15:39
Isolating a self-hosted macOS GitHub Actions runner from your daily user account

Isolating a self-hosted macOS GitHub Actions runner from your daily user account

If you run a self-hosted GitHub Actions runner on the same Mac you use every day, do not run the runner under your normal desktop user account.

This is especially important for iOS builds that use Fastlane, match, Xcode signing, or any workflow that calls the macOS security CLI.

What can go wrong

A self-hosted runner is not a VM by default. It runs as a normal process on the host, using the home directory, keychain, SSH config, caches, and environment of the user that owns the service.

@productdevbook
productdevbook / ci-runners-k3s-resource-limits.md
Last active June 17, 2026 08:54
Running CI runners and a production k3s cluster on one box without them fighting (systemd cgroup resource limits)

Running CI runners next to production without them fighting

If you self-host GitHub Actions runners on the same machine as a production Kubernetes cluster, you've got a quiet problem waiting to happen. A heavy CI job, say a Rust cargo build that spawns a dozen rustc processes and a memory-hungry linker, can grab every core and most of the RAM on the box. When that happens your databases don't crash in any obvious way. They just get slow, start missing health checks, and begin flapping. Nobody gets paged for "the linker used 40 gigs," but everyone notices the API timing out.

I ran into exactly this and fixed it with plain systemd resource control on cgroup v2. No nested containers, no extra daemons. Here's what I learned.

The setup

One bare-metal box with 12 logical cores (6 physical plus hyperthreading) and 64 GB of RAM. A k3s cluster runs the real work: app pods, Postgres, that sort of thing. Two self-hosted runners sit on the same host and build Rust projects all day.

Claude Code Custom Status Line

A custom status line for Claude Code that displays:

  • Directory name
  • Model name
  • Context usage with progress bar and percentage
  • Git branch with file counts and line changes (added/removed)

Preview

@productdevbook
productdevbook / pinia-colada-guide.md
Last active July 19, 2025 07:14
Pinia Colada: The Magical Way of Fetching Data in Vue.js 🍹

Pinia Colada: The Magical Way of Fetching Data in Vue.js 🍹

What is Pinia Colada? Learning Through an E-commerce Story

Imagine an online store. This store has thousands of products, and customers are constantly viewing products, adding them to cart, and making purchases. Pinia Colada is an amazing tool for managing this store's data!

Pinia Colada is a smart data fetching layer developed for Vue.js. The name might remind you of a cocktail, but it's actually a tool built on top of the Pinia state management library that makes data fetching operations much easier.

What's the Difference Between Pinia and Pinia Colada?

@productdevbook
productdevbook / drizzle-orm.md
Last active June 3, 2026 15:03
Drizzle ORM PostgreSQL Best Practices Guide (2025)

Drizzle ORM PostgreSQL Best Practices Guide (2025)

Latest Drizzle ORM features and optimal schema patterns

Major 2025 Update: PostgreSQL now recommends identity columns over serial types. Drizzle has fully embraced this change.

import { pgTable, integer, text, timestamp, varchar } from 'drizzle-orm/pg-core';
@productdevbook
productdevbook / server.ts
Created May 22, 2025 17:46 — forked from ashbuilds/server.ts
Implementing GraphQL Subscriptions with Websockets in a Bun Server using graphql-yoga
import Bun from 'bun'
import { createYoga, YogaInitialContext, YogaServerInstance } from 'graphql-yoga'
import { makeHandler } from "graphql-ws/lib/use/bun";
import { ExecutionArgs } from "@envelop/types";
import { schema } from './graphql/schema';
interface IUserContext {
token?: string;
}

🧠 VSCode Tip: Format Current File with ESLint (No Plugin Needed)

You can run eslint --fix on the currently open file in VSCode without using the ESLint extension by combining a task and a custom shortcut.

Create a .vscode/tasks.json file in your project and add the following:

pnpm install -g eslint
## Git Update Alias
You can create a Git alias to easily update your fork by synchronizing it with the original repository (upstream). The alias performs a series of commands to fetch the latest changes from upstream, merge them into your fork, and push the changes to your remote repository.
### 1. **Set up the Alias**
Run the following command in your terminal to define the `git update` alias:
```bash
git config --global alias.update '!f() { git fetch upstream && git merge upstream/main && git push origin main; }; f'