Skip to content

Instantly share code, notes, and snippets.

View monperrus's full-sized avatar

Martin Monperrus monperrus

View GitHub Profile
@monperrus
monperrus / openai-report-base64.md
Last active August 23, 2026 11:19
OpenAI OCR on Base64 Data Report
@monperrus
monperrus / piano-tab.superwebapp-tab.json
Created August 22, 2026 20:50
Martin's Super Webapp tab: Piano
{
"1": {
"tab": {
"id": "piano-tab",
"label": "Piano",
"html": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"UTF-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no\">\n<title>Piano Tab - Jazz Manouche</title>\n<script src=\"https://cdnjs.cloudflare.com/ajax/libs/vexflow/4.2.5/vexflow-min.js\"></script>\n<style>\n html, body { margin: 0; height: 100%; overflow: hidden; background: linear-gradient(135deg, #0b0f1a 0%, #0d1117 100%); color: #c9d1d9; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }\n * { box-sizing: border-box; }\n .app { display: flex; flex-direction: column; height: 100dvh; overflow: hidden; }\n .header { padding: 10px 16px 4px; text-align: center; }\n .header h1 { margin: 0; font-size: 16px; background: linear-gradient(135deg, #58a6ff, #79c0ff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-weight: 700; }\n .header .sub { font
@monperrus
monperrus / jmap-email.superwebapp-tab.json
Created August 22, 2026 20:45
Martin's Super Webapp tab: Email
{
"1": {
"tab": {
"id": "jmap-email",
"label": "Email",
"html": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"UTF-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n<title>JMAP Email</title>\n<style>\n html, body { margin: 0; height: 100%; background: #0d1117; color: #c9d1d9;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }\n * { box-sizing: border-box; }\n .app { display: flex; flex-direction: column; height: 100%; max-width: 600px; margin: 0 auto; }\n .header { padding: 12px 16px; border-bottom: 1px solid #30363d; background: #161b22;\n display: flex; align-items: center; gap: 8px; min-height: 52px; }\n .header h1 { margin: 0; font-size: 18px; font-weight: 600; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;\n cursor: pointer; -webkit-user-select: none; user-select: none; }\n .header h1:active { opacity: .7; }\n .header .back-btn { background: none; border: none;

agrifood — DG AGRI market price series (no key at all)

GET https://api.tech.ec.europa.eu/agrifood/api/{series}?beginDate=DD/MM/YYYY&endDate=DD/MM/YYYY

No apiKey, no auth. Verified: pigmeat/prices, cereal/prices, sugar/prices return weekly/monthly per-member-state price series. milk/prices → 404, i.e. the series list is narrower than hopeful client code assumes (a public repo's "confirmed" milk series was confirmed not to exist).

@monperrus
monperrus / apply_patch.md
Last active August 16, 2026 17:57
`apply_patch`: OpenAI's freeform patch tool, its transport, and its grammar

apply_patch: OpenAI's freeform patch tool, its transport, and its grammar

OpenAI's Codex CLI (and the GPT-5 model family more broadly) ships a tool called apply_patch for editing files. Unlike almost every other tool in the ecosystem, its argument isn't JSON — it's raw text, constrained by a formal grammar. This note covers what that means, exactly how it's wired into the API, and what happens when you actually probe it against real endpoints.

Why a non-JSON tool exists at all

@monperrus
monperrus / README-gist.md
Last active August 8, 2026 07:53
Independent, open-data ranking of the world's largest scholarly publishers by citation impact

Most-cited publishers — independent measurement

Independent, reproducible ranking of the world's largest scholarly publishers by citation impact, in the spirit of open-impact-factor and open-h5: open data source, open computation logic, reproducible by anyone.

Publisher-level citation rankings are often self-reported by publishers themselves, computed on data and methodology nobody outside the company can

@monperrus
monperrus / codex-wham-usage-api.md
Last active July 18, 2026 07:02
OpenAI Codex wham/usage API — Unofficial Reference

OpenAI Codex wham/usage API — Unofficial Reference

OpenAI Codex wham/usage API — Unofficial Reference

Disclaimer: This is an undocumented internal API used by the Codex CLI and related tools. It is not part of the OpenAI Platform API, carries no stability guarantee, and may change without notice.

Endpoint

GET https://chatgpt.com/backend-api/wham/usage
<html>
<head><meta charset="utf-8" /></head>
<body>
<div> <script type="text/javascript">window.PlotlyConfig = {MathJaxConfig: 'local'};</script>
<script charset="utf-8" src="https://cdn.plot.ly/plotly-2.30.0.min.js"></script> <div id="60a5584a-d462-4c2e-9a13-b85395b7599e" class="plotly-graph-div" style="height:900px; width:1200px;"></div> <script type="text/javascript"> window.PLOTLYENV=window.PLOTLYENV || {}; if (document.getElementById("60a5584a-d462-4c2e-9a13-b85395b7599e")) { Plotly.newPlot( "60a5584a-d462-4c2e-9a13-b85395b7599e", [{"customdata":[["IEEE Transactions on Software Engineering",77,73,3.0,1.0288461538461537],["Journal of Systems and Software",72,57,-28.0,0.75],["Information and Software Technology",69,57,-9.0,0.9134615384615384],["ACM Transactions on Software Engineering and Methodology",62,64,2.0,1.
@monperrus
monperrus / anthropic-privacy.md
Created June 23, 2026 06:26
Anthropic Privacy Policy

Privacy Policy

Effective July 8, 2026 · Previous Version

This policy was published on June 8, 2026 with an effective date of July 8, 2026.

Anthropic is an AI safety and research company working to build reliable, interpretable, and steerable AI systems.

This Privacy Policy explains how we collect, use, disclose, and process your personal data when you use our website, Claude.ai, or other Anthropic products and services (the “Services”). This Privacy Policy does not apply to content that we process on behalf of customers of our business offerings, such as our Enterprise accounts. Our use of that data is governed by our customer agreements covering access to and use of those offerings.

@monperrus
monperrus / claude-weekly-reset.md
Last active August 7, 2026 22:33
Claude Code: the 'weekly' usage limit resets every 72 hours, not 7 days

Claude Max: The "Weekly" Limit Resets Every 72 Hours, Not 7 Days

Background

Claude Pro/Max plans expose a usage API at https://claude.ai/api/oauth/usage that returns two utilization counters:

  • five_hour.utilization — a rolling 5-hour window (well documented)
  • seven_day.utilization — described as a "weekly" cap

The seven_day object also contains a resets_at field. Monitoring this field over ~11 days (June 9–20, 2026) revealed that the "weekly" limit does not reset every 7 days — it resets every 72 hours.