Skip to content

Instantly share code, notes, and snippets.

View ericboehs's full-sized avatar

Eric Boehs ericboehs

  • Oddball
  • Enid, OK
  • 23:05 (UTC -05:00)
View GitHub Profile
@ericboehs
ericboehs / cursor-focus.ts
Last active August 21, 2026 12:01
pi extension: hide the prompt cursor when the terminal pane loses focus (tmux focus-events), so it's obvious which split pi you're typing into
// Replace pi's fake reverse-video prompt cursor with the terminal's native
// hardware cursor.
//
// pi already emits CURSOR_MARKER at the correct editor position. Enabling the
// hardware cursor makes pi-tui position the terminal cursor at that marker;
// removing the fake reverse-video block prevents two cursors from overlapping.
// tmux and the terminal then provide their native focus behavior:
//
// - active tmux pane, focused terminal: normal hardware cursor
// - active tmux pane, unfocused terminal: terminal's inactive cursor style
@ericboehs
ericboehs / copilot-window-usage.ts
Last active August 19, 2026 22:58
Compact GitHub Copilot premium quota window status for pi and pi-footer
import type {
ExtensionAPI,
ExtensionContext,
} from "@earendil-works/pi-coding-agent";
import { readFile } from "node:fs/promises";
import { homedir } from "node:os";
import { join } from "node:path";
const PROVIDER = "github-copilot";
const STATUS_KEY = "copilot-window";
@ericboehs
ericboehs / codex-window-usage.ts
Last active August 19, 2026 22:55
Compact OpenAI Codex quota window status for pi and pi-footer
import type {
ExtensionAPI,
ExtensionContext,
} from "@earendil-works/pi-coding-agent";
const PROVIDER = "openai-codex";
const STATUS_KEY = "codex-window";
const USAGE_URL = "https://chatgpt.com/backend-api/wham/usage";
const REQUEST_TIMEOUT_MS = 10_000;
@ericboehs
ericboehs / Claude Artifact Blank Frame Fix.user.js
Last active August 19, 2026 19:50
Fixes Claude artifacts rendering blank in Safari (WebKit flex-basis:0% abspos containing-block bug)
// ==UserScript==
// @name Claude Artifact Blank Frame Fix
// @description Works around a WebKit layout bug that renders Claude artifacts blank in Safari
// @author Eric Boehs
// @version 1.1
// @match https://claude.ai/code/artifact/*
// @match https://claude.ai/public/artifacts/*
// @run-at document-end
// @inject-into content
// @grant none
@ericboehs
ericboehs / slack-classifier-bug-report.md
Last active August 9, 2026 13:57
Slack file-type classifier bug: .md files with line-initial record*/program* words misclassified as Pascal; + any non-ASCII char = Binary

Slack file-type classifier bug: .md files misclassified as Pascal / Binary

This file is a self-demonstrating example. Because it contains a line-initial trigger word plus non-ASCII characters (see the demo line at the bottom), dragging this file into any Slack channel uploads it as "Binary file" with no preview. That IS the bug.

Summary

The file-type classifier applied to uploaded files (rolled out ~June 2026)

@ericboehs
ericboehs / kokorod.py
Last active May 27, 2026 20:42
kokorod: single-file persistent daemon + auto-launching client for Kokoro-82M TTS (mlx-audio). Cuts time-to-first-audio from ~5s to ~0.2s; self-shuts down after 30 min idle.
#!/usr/bin/env python3
# /// script
# requires-python = "==3.12.*"
# dependencies = [
# "mlx-audio>=0.3.0",
# "mlx",
# "misaki[en]<0.9",
# "num2words",
# "spacy",
# "espeakng-loader",
@ericboehs
ericboehs / kk
Created May 27, 2026 17:58
kokorod: persistent daemon + auto-launching socket client for Kokoro-82M TTS (mlx-audio). Cuts time-to-first-audio from ~5s to ~0.2s; self-shuts down after 30 min idle.
#!/usr/bin/env bash
# kk — thin client for the kokorod daemon, with auto-launch.
#
# Sends a speak request over /tmp/kokoro.sock. If the daemon isn't
# running, launches it in the background and waits for the socket to
# come up before sending.
#
# Usage:
# kk "Hello, world."
# echo "text" | kk
@ericboehs
ericboehs / bonusly
Created April 27, 2026 16:28
bonusly — send/check Bonusly bonuses from the terminal (with prefix-matched core-value hashtags)
#!/bin/bash
# Bonusly CLI — send/check Bonusly bonuses from the terminal.
#
# Usage:
# bonusly balance # show giving balance
# bonusly users [query] # search/list users
# bonusly send <amount> <user> <message> [#tag] # send bonus (confirms)
# bonusly history [limit] # recent bonuses you received
#
# Token: read from $BONUSLY_API_TOKEN; falls back to `fnox get BONUSLY_API_TOKEN`.
@ericboehs
ericboehs / vtt-to-md
Created April 25, 2026 02:10
vtt-to-md: Convert WebVTT transcripts to anchored markdown with audio-fragment-linked timestamps
#!/usr/bin/env ruby
# Convert WebVTT to anchored markdown with HH:MM:SS audio-fragment links.
require 'optparse'
VERSION = '0.1.0'
options = { audio: nil, output: nil, title: nil, no_audio: false }
parser = OptionParser.new do |opts|
@ericboehs
ericboehs / claude-browser
Last active July 15, 2026 00:56
Claude Browser — single-file Ruby Sinatra app to browse, search, and view Claude Code context surfaces: auto-memory markdown under ~/.claude/projects/*/memory/ and skills under ~/.claude/skills/, with always-loaded token cost estimates
#!/usr/bin/env ruby
# frozen_string_literal: true
# Claude Browser — browse, search, and view Claude Code context surfaces:
# the auto-memory markdown files under ~/.claude/projects/*/memory/ and the
# user skills under ~/.claude/skills/*/SKILL.md
require 'bundler/inline'
gemfile do