Skip to content

Instantly share code, notes, and snippets.

@timsonner
timsonner / install-instructions.md
Created May 21, 2026 06:40
Google Gemini computer_use Playwright demo

Google Gemini and Playwright / computer_use demo

1. Clone Google's official computer-use-preview repository

git clone https://github.com/google-gemini/computer-use-preview.git
cd computer-use-preview

2. Set up a local Python virtual environment

@timsonner
timsonner / SKILL.md
Created May 21, 2026 05:59
Claude. Interact with web browser content when rendered as <canvas> element using mcp__computer-use__

Skill: Interacting with Canvas-Rendered Browser Content

When to use

Use this skill when:

  • get_page_text returns empty or only navigation chrome
  • read_page returns an empty accessibility tree
  • The page is known to use canvas, WebGL, or a custom rendering engine
  • You need to visually read or interact with content that DOM tools cannot access

@timsonner
timsonner / opencode.json
Last active May 2, 2026 23:04
OpenCode config with local Unsloth Studio model, default model set to OpenRouter Owl Alpha. Updated permissions. Global "~/.config/opencode/opencode.json" or local ".opencode/opencode.json"
{
"$schema": "https://opencode.ai/config.json",
"model": "openrouter/owl-alpha",
"provider": {
"openrouter": {
"npm": "@ai-sdk/openai-compatible",
"name": "OpenRouter",
"options": {
"baseURL": "https://openrouter.ai/api/v1",
"apiKey": "sk-or-v1-..."
@timsonner
timsonner / fix-secureboot-mok.sh
Created April 30, 2026 06:40
Sets up a Machine Owner Key (MOK) to sign DKMS modules (nvidia, evdi)
#!/bin/bash
# fix-secureboot-mok.sh
#
# Sets up a Machine Owner Key (MOK) to sign DKMS modules (nvidia, evdi)
# so they load under Secure Boot on Proxmox VE / Debian trixie.
#
# Root cause: Secure Boot requires all kernel modules to be signed by a key
# trusted by the UEFI firmware. DKMS-built modules (nvidia, evdi/DisplayLink)
# are unsigned by default. A MOK enrolled in shim's MOK database fills this gap.
#
@timsonner
timsonner / fix-unsloth-cuda.sh
Created April 30, 2026 06:18
Rebuilds Unsloth Studio's llama-server with CUDA support on Debian trixie (glibc 2.41+) with kernel 7.0+ and NVIDIA driver 595+
#!/bin/bash
# fix-unsloth-cuda.sh
#
# Rebuilds Unsloth Studio's llama-server with CUDA support on Debian trixie
# (glibc 2.41+) with kernel 7.0+ and NVIDIA driver 595+.
#
# Root causes fixed:
# 1. Unsloth ships a CPU-only llama-server binary
# 2. CUDA 12.x toolkit installer requires gcc <= 13 (system has gcc 14)
# 3. CUDA 12.x math_functions.h missing noexcept on sinpi/cospi,
@timsonner
timsonner / fix-nvidia.sh
Last active July 24, 2026 11:47
Installs NVIDIA driver 595+ on Proxmox VE / Debian trixie with kernel 7.0+ because 550 is incompatible. Blacklists Nouveau and NovaCore.
#!/bin/bash
# fix-nvidia.sh
#
# Installs NVIDIA driver 595+ on Proxmox VE / Debian trixie with kernel 7.0+.
#
# Root cause: The Debian/Proxmox nvidia-kernel-dkms package (version 550) cannot
# build against kernel 6.17+ or 7.0+ due to DRM API changes (struct_mutex removal,
# framebuffer signature changes). The official .run installer at 595.71.05+ includes
# the necessary patches.
#
@timsonner
timsonner / fix-displaylink.sh
Last active April 30, 2026 05:03
Fixes third monitor not showing with DisplayLink on Proxmox VE / Debian trixie with kernel 7.0+ and GNOME Wayland. Re-connect dock after run.
@timsonner
timsonner / HubApps
Last active April 25, 2026 18:53
Fix Edge Copilot chat in Linux. Restart after saving file into <HOME>/.config/microsoft edge/Default
{
"current_locale": "en-GB",
"hub_apps": [ {
"capabilities": {
"deprecated_hide_header": true
},
"custom_actions": [ {
"action": {
"target": "sidepane",
"type": "url_action"
@timsonner
timsonner / SKILL.md
Last active April 24, 2026 04:55
Claude use-computer any browser with PowerShell and dotnet assemblies. Cuz its fun. nah mean?

name: browser-input description: > Use this skill whenever you need to click, type, or navigate inside a browser window (Edge, Chrome, Firefox, etc.) but the computer-use MCP blocks interaction because the browser is granted at tier "read". This skill bypasses that restriction by injecting mouse and keyboard input at the Windows API level via PowerShell and user32.dll — the same technique that worked to navigate Edge to code.visualstudio.com. Trigger this skill any time you see the error "granted at tier read — visible in screenshots only, no clicks or typing", or any time the user asks you to click/type

@timsonner
timsonner / extract_pypi_maintainer_emails.py
Created March 29, 2026 08:47
Program that extracts package maintainer/author emails from PyPI packages by fetching the simple index and then querying each package's metadata.
"""
extract_pypi_maintainer_emails.py
author: timsonner.com
Program that extracts package maintainer/author emails from PyPI packages by fetching the simple index and then querying each package's metadata.
Errors are silent (no output for packages that fail or have no email).
example output:
somepackagename: maintainer@contoso.com
"""
import random