Skip to content

Instantly share code, notes, and snippets.

View R44VC0RP's full-sized avatar
🚩
creating a dangerous AI

Ryan Vogel R44VC0RP

🚩
creating a dangerous AI
View GitHub Profile
```
Brought ~/.local/share/opencode/opencode.db back into sync with the current Drizzle schema and repo migrations.
- Backed up the database first to ~/.local/share/opencode/opencode.db.sync-backup-20260309T134117Z.
- The DB had drifted: __drizzle_migrations contained two stale applied entries (20260228203230_blue_harpoon, 20260303231226_add_workspace_fields) and was missing the current 20260227213759_add_session_workspace_id.
- The live schema also had the legacy workspace shape and an extra account table, while current Drizzle expects workspace.config in packages/opencode/src/control-plane/workspace.sql.ts:5 and session.workspace_id in packages/opencode/src/session/session.sql.ts:11.
- I rebuilt workspace to the current shape, removed the legacy account table, and corrected the migration journal. The affected legacy tables were empty, so no user rows were lost.
- Verified the final state: repo migration folders now match applied migrations exactly, workspace.config exists, account is gone, and session_works
@R44VC0RP
R44VC0RP / cursor-ptt.sh
Last active March 27, 2026 17:57
Allows you to overwrite your cursor tab key to use it as a PTT key for your favorite dictation software.
#!/bin/bash
# Remap USB Tab Button to F20 (for PTT use with Superwhisper, Discord, etc.)
# Works with generic USB tab key (VendorID: 0x8808, ProductID: 0x6600)
VID="0x8808"
PID="0x6600"
PLIST="$HOME/Library/LaunchAgents/com.user.usb-button-remap.plist"
# Check if device is connected
if ! hidutil list | grep -q "0x8808.*0x6600"; then
echo "ERROR: USB button not detected. Plug it in and try again."
exit 1
@R44VC0RP
R44VC0RP / cf-internal-app.md
Last active May 23, 2026 01:50
Internal Cloudflare App Skill
name cloudflare-internal-app
description Use when creating or advising on quick internal apps with Cloudflare Workers, D1, Wrangler, Bun, custom domains, cron triggers, Worker secrets, or lightweight server-rendered dashboards like x-rank.

Cloudflare Internal App Stack

Use this skill when the user wants a small internal app that needs simple hosting, a database, scheduled jobs, custom domains, secrets, or admin endpoints without running a server or Kubernetes deployment.

Default Stack

  • Runtime: Cloudflare Workers
  • Language: TypeScript
  • Tooling: Bun plus Wrangler