Skip to content

Instantly share code, notes, and snippets.

@JavaGT
JavaGT / bookmarklet.html
Created August 17, 2026 22:08
TVNZ Session Exporter bookmarklet (updated for current tvnz.co.nz storage scheme)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>TVNZ Session Exporter (updated)</title>
<style>
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
max-width: 720px; margin: 40px auto; padding: 0 20px; line-height: 1.6; }
.bookmarklet { display: inline-block; padding: 14px 28px; background: #1a73e8; color: #fff;
text-decoration: none; border-radius: 8px; font-weight: 600; font-size: 1.2em; cursor: grab; }
#!/bin/bash
set -euo pipefail
mkdir -p ~/.config/karabiner ~/.local/bin
cat > ~/.config/karabiner/karabiner.json <<'CONFIG'
{
"global": {
"check_for_updates_on_startup": false,
"show_in_menu_bar": false,
@JavaGT
JavaGT / rapid-feedback.user.js
Last active August 1, 2026 02:32
Rapid Feedback
// ==UserScript==
// @name Rapid Feedback
// @namespace https://scope.javagrant.ac.nz
// @version 5.7
// @description Hold Alt+⌘/Ctrl+click any element to annotate it. Multi-select, relocation, element zoom, Shadow DOM isolation. Exports as markdown/JSON.
// @note v5.7: canonical home moved from the gist to github.com/JavaGT/rapid-feedback; this build re-points update checks there
// @note v5.4: editable multi-select list (remove/promote/add members), markers persist while the popover is open, style tweaks preview across the whole selection, every member exported with its own selector
// @note v5.6: chord-clicking with the popover open grows the selection instead of discarding the draft; tool chrome is click-through while the chord is held or a pick mode is running, so it never covers what you meant to click; nothing the tool renders can be annotated; comments stay editable in place from any page
// @note v5.5: saved selections reopen for full editing with miss
@JavaGT
JavaGT / README.md
Last active June 20, 2026 11:56
Multi-provider API key manager for opencode

switch-key

Multi-provider API key manager for opencode. Named profiles, GitHub sync, interactive arrow-key picker.

Install

curl -fsSL https://gist.githubusercontent.com/JavaGT/8833308eb12647b75bbdfda0debf81f3/raw/switch-key.mjs -o ~/.config/opencode/switch-key.mjs
chmod +x ~/.config/opencode/switch-key.mjs
ln -sf ~/.config/opencode/switch-key.mjs /opt/homebrew/bin/switch-key
@JavaGT
JavaGT / setup-opencode2.sh
Created June 11, 2026 21:50
Create a second opencode instance with a separate account
#!/bin/bash
set -euo pipefail
# setup-opencode2.sh
# Creates a second opencode instance that shares config but uses a separate account.
#
# Usage:
# bash setup-opencode2.sh
#
# Then:
@JavaGT
JavaGT / scope2-fix-report.md
Created June 11, 2026 10:30
Scope 2 — Align Undo/Redo with Google Docs Behavior
@JavaGT
JavaGT / scope2-test-results.md
Created June 11, 2026 10:24
Scope 2 Multi-User Undo/Redo Stack — Test Results

Scope 2 — Undo/Redo Test Results

Setup

  • Application: Research tool for managing and coding audio-visual media
  • Project: Bluey (The Magic Xylophone artefact), 305 transcript segments
  • Tab 0 (User A): javagrant@gmail.com (Owner)
  • Tab 1 (User B): Same account (javagrant@gmail.com), second browser tab
  • Key finding: Undo stacks are per-tab (in-memory), not shared across sessions

@JavaGT
JavaGT / test-results.md
Created June 11, 2026 08:59
Google Docs Multi-User Undo Stack — 15 Test Results

Google Docs Undo Stack — Test Results

Setup

  • Document: Untitled Google Doc, shared "Anyone with the link can edit"
  • Tab 0 (User A): javagrant@gmail.com
  • Tab 1 (User B): Same account (javagrant@gmail.com), second browser tab
  • Key finding: Undo stacks are per-session/tab, not per-account

@JavaGT
JavaGT / get_cookies_locally.user.js
Last active August 11, 2026 03:07
Get cookies.txt LOCALLY - Userscript port. Export cookies in Netscape/JSON/Header format. Safari-compatible.
// ==UserScript==
// @name Get cookies.txt LOCALLY
// @namespace https://github.com/kairi003/Get-cookies.txt-LOCALLY
// @version 0.2.0
// @description Get cookies.txt, NEVER send information outside (userscript port). Supports Safari via Userscripts app.
// @author kairi003
// @match *://*/*
// @grant GM_download
// @grant GM_notification
// @grant GM_setClipboard
@JavaGT
JavaGT / README.md
Last active June 30, 2026 03:08
Canvas SpeedGrader Scorer — floating scoring window for assignment variables

Canvas SpeedGrader Scorer

Floating scoring window for Canvas SpeedGrader. Track assignment scores across custom variables (dimensions) in localStorage, so you can see how you've scored a given variable on previous assignments.

Usage

  1. Install the userscript in Tampermonkey
  2. Open any SpeedGrader page at `canvas.auckland.ac.nz`
  3. A floating "Scorer" window appears in the top-right corner
  4. Check a variable to enable its slider, then pick 1–5