Skip to content

Instantly share code, notes, and snippets.

View rgarcia's full-sized avatar

Rafael rgarcia

View GitHub Profile
@rgarcia
rgarcia / gist-summary.md
Created May 30, 2026 02:21
Kernel GPU h264_nvenc smoke test repro and results

Kernel GPU NVENC smoke test results

Summary

We investigated empty replay MP4s from GPU Kernel browsers. The failure is reproducible outside the replay API by running ffmpeg directly inside live GPU browser VMs with h264_nvenc.

Key result: NVENC capability is mixed per GPU browser VM.

  • GPU sessions tested with direct ffmpeg -c:v h264_nvenc: 22
  • NVENC-capable sessions: 12
@rgarcia
rgarcia / gist-content.md
Created March 2, 2026 22:51
Cursor + GPT models: Provider Error caused by overly-complex MCP tool JSON schemas (OpenAI nesting depth limit)

Cursor + GPT models: Provider Error caused by overly-complex MCP tool JSON schemas (OpenAI nesting depth limit)

Cursor "Provider Error" with GPT models: MCP tool schema nesting depth

Summary

When using Cursor with MCP (Model Context Protocol) servers, GPT models (gpt-5.3-codex-, gpt-5.2-codex-, etc.) return a generic "Provider Error" that gives no actionable information:

@rgarcia
rgarcia / README.md
Last active February 6, 2026 21:06
Kernel: SCP files to/from browser VMs via kernel browsers ssh

SCP Files to/from Kernel Browser VMs

The Kernel CLI's kernel browsers ssh command (kernel/cli#103) provisions an SSH server on a browser VM and tunnels the connection over WebSockets. Because it sets up a standard OpenSSH server, you can use scp (and rsync, sftp, etc.) with the same tunnel — not just interactive shells.

Prerequisites

  1. Kernel CLI v0.14.5+ (with the browsers ssh subcommand and -o json support)

  2. websocat — WebSocket-to-TCP bridge used as the SSH ProxyCommand

@rgarcia
rgarcia / SKILL.md
Created February 2, 2026 19:38
DoorDash automation skill for agent-browser
name doordash
description Access DoorDash for food delivery ordering, order history, account management, and restaurant/store browsing.
allowed-tools Bash(agent-browser:*)

DoorDash.com

Uses agent-browser with Kernel cloud browser provider. See the kernel-agent-browser skill for best practices.

@rgarcia
rgarcia / viewport-debug.sh
Created January 22, 2026 00:48
Debug script for Kernel browser viewport dimensions
#!/bin/bash
#
# Viewport Debug Script for Kernel Browsers
#
# This script demonstrates the difference between:
# 1. Creating a browser WITH viewport set at creation time
# 2. Creating a browser WITHOUT viewport (uses default 1920x1080)
#
# Usage: ./viewport-debug.sh
#
@rgarcia
rgarcia / test-kernel-provider.sh
Created January 22, 2026 00:36
Kernel provider integration test for agent-browser
#!/bin/bash
#
# Kernel Provider Integration Test
# Tests agent-browser CLI with Kernel cloud browser provider
#
# Usage:
# KERNEL_API_KEY="your-api-key" ./test-kernel-provider.sh
#
# Requirements:
# - agent-browser built (npm run build && npm run build:native)
#!/usr/bin/env bash
set -e
cd /tmp
rm -rf /tmp/mock
mkdir /tmp/mock
cd /tmp/mock
git clone https://github.com/golang/mock mock-before
package main
import (
"fmt"
"log"
"gopkg.in/yaml.v2"
)
const withAlias = `foo:
@rgarcia
rgarcia / circuit_breakers.md
Last active October 20, 2022 07:18
go circuit breakers
func New(errorThreshold, successThreshold int, timeout time.Duration) *Breaker

New constructs a new circuit-breaker that starts closed. From closed, the breaker opens if "errorThreshold" errors are seen without an error-free period of at least "timeout". From open, the breaker half-closes after "timeout". From half-open, the breaker closes after "successThreshold" consecutive successes, or opens on a single error.

@rgarcia
rgarcia / main.go
Created September 19, 2016 23:56
net/http server context object does not cancel on closed connections, need to listen for closenotify
package main
import (
"context"
"fmt"
"log"
"net/http"
"time"
"golang.org/x/net/context/ctxhttp"