Skip to content

Instantly share code, notes, and snippets.

View btucker's full-sized avatar
👋

Ben Tucker btucker

👋
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>forEach vs. map</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
{"fileData": {"/tmp/http-proxy-server/spec.md": {"file_path": "/tmp/http-proxy-server/spec.md", "rel_path": "http-proxy-server/spec.md", "content": "# HTTP Proxy Server Specification\n\n## Overview\nBuild a uvicorn-based HTTP proxy server that proxies requests to simonwillison.net, adding custom headers for identification and performance monitoring.\n\n## Requirements\n\n### Core Functionality\n- [x] Accept HTTP requests on localhost:8000\n- [x] Proxy all requests to simonwillison.net at the same path\n- [x] Preserve HTTP method (GET, POST, etc.)\n- [x] Preserve request headers (except Host)\n- [x] Preserve request body for POST/PUT/PATCH requests\n- [x] Return proxied response with original status code and headers\n\n### Headers\n- [x] Add `x-proxied-by: uvicorn` header to proxied response\n- [x] Add `x-response-time-microseconds` header with the time taken to proxy the request (in microseconds)\n- [x] Measure only the upstream request time, not the whole request cycle\n\n### Implementation\n- [x] Use httpx
@btucker
btucker / code-data.json
Created December 29, 2025 22:49
claude-code-transcripts local 56e5f88c-6e43-464b-b415-5b29cbae20c2 (data)
This file has been truncated, but you can view the full file.
@btucker
btucker / code.html
Created December 29, 2025 22:49
claude-code-transcripts local 56e5f88c-6e43-464b-b415-5b29cbae20c2
<!DOCTYPE html>
<html lang="en">
<head>
<script>window.DATA_GIST_ID = "61e520bb9dea7beae31cd9d494284256";</script>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Claude Code transcript - Code</title>
<link rel="stylesheet" href="styles.css">
</head>
@btucker
btucker / 11
Created March 12, 2026 18:37
PR #1966 screenshots
KJoK5Ntfr7/7flNg5AdjU17u/TWjhryv2sDtTec4n2fPig8SZhDgxqAFf2KRSCGX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