Skip to content

Instantly share code, notes, and snippets.

View robinebers's full-sized avatar
:shipit:
vibe coding

Robin Ebers robinebers

:shipit:
vibe coding
View GitHub Profile
@robinebers
robinebers / claude-patch.md
Last active June 5, 2026 10:37
Here are instructions to patch the local Claude.app on macOS to allow additional hosts other than localhost.

Claude Patched App (macOS)

Patch local Claude.app so Preview can follow HTTPS auth redirects (e.g. WorkOS), not only localhost.

Output: /Applications/Claude (Patched).app copied from /Applications/Claude.app.

Quit stock Claude before launching the patched copy — both use com.anthropic.claudefordesktop.


@robinebers
robinebers / settings.json
Last active May 11, 2026 07:48
Claude Code Statusline for OpenUsage - Display Claude usage (Session, Weekly, Today) in Claude Code's status bar using the OpenUsage local API. Requires OpenUsage app running.
{
"statusLine": {
"type": "command",
"command": "~/.claude/statusline.sh",
"padding": 1
}
}
@robinebers
robinebers / claude-usage-statusline-minimal.sh
Created March 30, 2026 23:10
Claude Code Statusline for OpenUsage Display your Claude usage (Session, Weekly, Today) in Claude Code's status bar using the OpenUsage local API. ## Quick Install ```bash curl -o ~/.claude/claude-usage-statusline.sh \ https://gist.githubusercontent.com/YOUR_GIST_ID/raw/statusline.sh chmod +x ~/.claude/claude-usage-statusline.sh ``` ## Configure…
#!/usr/bin/env bash
# Minimal Claude Code statusline - no colors, no dependencies
# Format: "Claude Team 5x | Session: 4% | Week: 11% | Today: $0.47 · 1.1M tokens"
API_URL="http://localhost:6736/v1/usage/claude"
CACHE_FILE="${TMPDIR:-/tmp}/claude-statusline-cc.json"
CACHE_AGE_MAX=300 # 5 minutes
# Fetch with simple caching
if [[ -f "$CACHE_FILE" ]]; then

Implement Vercel AI Gateway + Nano Banana City Quiz

This is a Next.js 16 app installed into test-app which you now need to modify into a browser-based game.

What we’ll integrate

  • Use AI Gateway single model strings with the AI SDK:
    • Image (Nano Banana): google/gemini-2.5-flash-image
    • Text (optional utility): google/gemini-2.5-flash
  • Auth via AI_GATEWAY_API_KEY in .env.local.
@robinebers
robinebers / patterns.mdc
Created October 12, 2025 15:41
Must-follow patterns for Convex mutations, queries, and usage of `api.` or `internal.`
---
description: Must-follow patterns for Convex mutations, queries, and usage of `api.` or `internal.`
alwaysApply: false
---
# Convex API Reference Patterns
## Overview
To avoid TypeScript deep instantiation errors (TS2589) when working with Convex's generated API objects, we use lightweight function references created with `makeFunctionReference` instead of importing `api` or `internal` from `convex/_generated/api`.
// middleware.ts
import { NextResponse, NextRequest } from "next/server";
const BYPASS_COOKIE = "maint_bypass";
const BYPASS_SECRET = "123456"; // optional, let's you bypass it
export function middleware(req: NextRequest) {
const { pathname, searchParams } = req.nextUrl;
// Allow critical paths & assets (adjust to your app)
@robinebers
robinebers / bittrex-balance.js
Created August 3, 2017 14:56
A badly written node script that calculates how much your altcoins are worth on the Bittrex exchange.
const crypto = require('crypto');
const http = require('request');
const apiKey= '';
const apiSecret = '';
const hash = crypto.createHmac('sha512', apiSecret)
let nonce = Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5);
let url = `https://bittrex.com/api/v1.1/account/getbalances?apikey=${apiKey}&nonce=${nonce}`;
@robinebers
robinebers / runner.js
Last active August 5, 2016 15:26
Nightwatch.js BrowserStack Runner
// 1. start the dev server using production config
process.env.NODE_ENV = 'testing';
const server = require('../../build/dev-server.js');
const spawn = require('cross-spawn');
const browserStack = require('browserstack-local');
const testEnv = require('../../config/test.env.js');
// For more information on Nightwatch's config file, see
// http://nightwatchjs.org/guide#settings-file
@robinebers
robinebers / nightwatch.conf.js
Last active December 21, 2023 00:53
Nightwatch.js BrowserStack Configuration
require('babel-register');
const testEnv = require('../../config/test.env.js');
// http://nightwatchjs.org/guide#settings-file
module.exports = {
src_folders: ['test/e2e/specs'],
output_folder: 'test/e2e/reports',
custom_assertions_path: ['test/e2e/custom-assertions'],
selenium: {