Skip to content

Instantly share code, notes, and snippets.

@GGPrompts
GGPrompts / freerdp-rail-snap-patches.diff
Last active April 15, 2026 19:08
WSLg Weston patches: per-monitor minmax info + enable local move for snap layouts (microsoft/wslg#22)
diff --git a/client/Windows/wf_rail.c b/client/Windows/wf_rail.c
index a775a588a..ef2dc2705 100644
--- a/client/Windows/wf_rail.c
+++ b/client/Windows/wf_rail.c
@@ -16,11 +16,12 @@
* limitations under the License.
*/
-#include <freerdp/config.h>
+#ifdef HAVE_CONFIG_H
@GGPrompts
GGPrompts / cache-health-statusline.md
Last active May 22, 2026 03:46
Add cache health to statusline

Add a cache health indicator to your Claude Code statusline

If you're using a custom statusline script, you can add cache health monitoring to catch when your prompt cache is getting thrashed. Here's what to add and what it means.

What it tracks: The ratio between cache_read_input_tokens (cheap, reused from cache) and cache_creation_input_tokens (expensive, rebuilding cache). When cache reads drop to zero while creation stays high, you're paying full price every turn instead of getting the ~90% cache discount.

Step 1: Extract the token data

Add this near the top where you parse the statusline JSON input:

@GGPrompts
GGPrompts / cache-audit-guide.md
Last active April 4, 2026 05:43
Hidden Token Costs in Claude Code: How to Audit Your Cache Efficiency

Hidden Token Costs in Claude Code: How to Audit Your Cache Efficiency

You might be burning through your Claude Code usage faster than you think. After digging into Claude Code's local stats file, I traced a major silent token sink that most users don't know about.

The Discovery

Claude Code stores per-project session stats in ~/.claude.json.tmp.*. This file contains token breakdowns including cache hit/miss ratios that reveal how efficiently you're using your subscription.

By cross-referencing these stats with session transcripts, I found the culprit behind anomalous sessions with poor cache performance.

@GGPrompts
GGPrompts / termux-fixes.md
Last active July 2, 2026 05:24
Termux Fixes: Running AI CLI Tools (Claude Code, Codex) on Android — updated July 2026 for the claude-code native-binary era (2.1.114+)

Termux Fixes: Running AI CLI Tools on Android

Hard-won fixes for running Claude Code, OpenAI Codex, GitHub Copilot, and Rust PTY apps on Termux/Android.

⚠️ July 2026 update: Section 2 (Claude Code via Bun) is obsolete — Anthropic removed cli.js from the npm package in 2.1.114 (April 17, 2026), so there is no JS entrypoint to run under Bun/Node anymore. See Section 5 for the native-binary era fixes (glibc loader wrapper, DNS via nsswitch.conf, hook shebang breakage, login workaround, and the safe update procedure). Sections 1, 3, and the general tips still apply.


1. Making portable-pty Work on Android/Termux

@GGPrompts
GGPrompts / gist:bc4a1bb821cb3db015b87cedc7c9bec5
Created December 17, 2025 22:29
WebGL vs Canvas transparency notes (xterm.js + backgrounds)
# WebGL vs Canvas Transparency Notes
## Problem
WebGL doesn't play nice with transparent backgrounds and CSS glassmorphic effects.
## Solution (from Opustrator)
Use a **hybrid approach**:
1. **Canvas 2D** for animated background effects (supports transparency natively)
@GGPrompts
GGPrompts / ECOSYSTEM_PLAN.md
Last active December 13, 2025 00:29
GGPrompts Ecosystem Integration Plan - TabzChrome, GGPrompts, TFE, Portfolio

GGPrompts Ecosystem - Integration Status & Plan

Updated: 2025-12-12 Projects: TabzChrome, GGPrompts (ggprompts-next), Portfolio (my-portfolio)


Executive Summary

Three interconnected projects form the TabzChrome Ecosystem:

@GGPrompts
GGPrompts / claude-code-mcp-cli-experimental.md
Created December 9, 2025 15:18
Claude Code MCP-CLI Experimental Mode - 80% Token Savings

Claude Code MCP-CLI Experimental Mode

Announced December 8, 2025 by Anthropic engineer @catherinewu

The Problem

MCP servers load full tool definitions into the system prompt at session start. Power users with multiple MCPs (supabase, tabz, shadcn, docker-mcp, etc.) can burn 40-50k tokens before typing anything.

The Solution

@GGPrompts
GGPrompts / wipe.md
Last active March 19, 2026 16:55
Claude Code /wipe command - Generate handoff, clear context, and auto-continue in fresh session
description Generate handoff, clear context, and auto-continue in fresh session

Generate a concise handoff summary, then automatically clear context and resume with the handoff in a fresh session.

Step 1: Generate Handoff Summary

Use this format (skip sections that don't apply):

@GGPrompts
GGPrompts / generate-news.md
Last active December 16, 2025 14:48
Claude Code slash command for generating daily AI news digest for GGPrompts
description Generate daily AI news digest for GGPrompts

Daily AI News Digest Generator

Generate a daily AI news digest for GGPrompts. Gather real data from multiple sources, then write to the site.

Step 0: Options Menu

@GGPrompts
GGPrompts / SESSION_SUMMARY.md
Created November 24, 2025 15:38
Portfolio Style Guides - Mock Images Implementation Summary (2025-11-24)