Skip to content

Instantly share code, notes, and snippets.

@adewale
adewale / 01-flow-state-sequence.md
Created August 2, 2026 12:46
Agentic Mermaid: Mermaid 11.16 construct-level fidelity audit for PR #192

Review

Scope and pin

Audited the checked-out pr-192 branch against local mermaid@11.16.0 and the vendored official pages for FLOWCHART, STATE, and SEQUENCE. plan.md and progress.md were requested but are absent in this checkout. The PR diff is Sankey-focused; the findings below are pre-existing family-contract gaps exposed by auditing the PR's overall claimed capability state, not regressions introduced in its changed source files.

Findings

High — SEQUENCE — official half-arrow tokens corrupt participant identity

  • Syntax:
    sequenceDiagram

A-|/B: bottom half arrow

@adewale
adewale / unit_distance_difference.py
Created May 20, 2026 23:44
Failing to understand the planar unit-distance problem with a toy demonstration
"""Toy demonstration of the planar unit-distance idea.
This does NOT reproduce OpenAI's construction. It shows the mechanism:
if an arithmetic system gives you more same-length difference vectors, then after
rescaling those vectors to length 1, the point set has more unit-distance pairs.
"""
from math import sqrt
@adewale
adewale / haiku.ts
Created May 6, 2026 23:03
HaikuBot
import type { FlueContext } from '@flue/sdk/client';
import { Bash, InMemoryFs } from 'just-bash';
import * as v from 'valibot';
export const triggers = { webhook: true };
export default async function ({ init, payload }: FlueContext) {
const fs = new InMemoryFs();
const sandbox = () => new Bash({ fs, cwd: '/workspace' });
@adewale
adewale / skill-marketplaces.txt
Created March 11, 2026 12:48
Where to list a Claude Code skill: marketplaces, submission processes, and prerequisites
Claude Code Skill Marketplaces
===============================
Where to list a Claude Code skill, how to submit, and what you need first.
1. GitHub Releases
Process: Push to main, tag, run `gh release create vX.Y`
Prerequisites: A public GitHub repo
Updates: Push + new release
@adewale
adewale / gist:ee4a5cd1200e1bacefde4914fadff1c7
Created November 21, 2020 15:30
Note in Reader bookmarklet
javascript:var b=document.body;var GR________bookmarklet_domain='http://www.google.com';if(b&&!document.xmlVersion){void(z=document.createElement('script'));void(z.src='http://www.google.com/reader/ui/link-bookmarklet.js');void(b.appendChild(z));}else{}
@adewale
adewale / gist:43e9be1e145b65774d2a05aa40a92607
Created May 29, 2020 22:47
Converting Twitter archive into a human readable list of epigrams
=Convert javascript data into JSON
sed -e 's/window.YTD.tweet.part0 = //' ./data/tweet.js > ./data/tweet.json
=Convert comma-delimited JSON into newline-delimited JSON
cat data/tweet.json | jq -c '.[]' > newline.json
=Extract all the tweets that match the desired format
grep 'Theory:' newline.json > theories.json
= Extract the text and URL of each matching tweet. This is where we lose data because some tweets contain newlines (verify by comparing the number of tweets in both files) or because some tweets are retweets.
@adewale
adewale / gist:b5da770d99784b6558221e20c6b8c5be
Created September 9, 2016 09:27
amp-user-notification on express.co.uk that uses relative URLs and will be broken when https://github.com/ampproject/amphtml/issues/4537 gets changed
<amp-user-notification data-dismiss-href="/setcookielaw" data-show-if-href="/cookielaw?timestamp=TIMESTAMP" id="amp-user-cookie" layout=nodisplay>
<div>
<button on="tap:amp-user-cookie.dismiss">Accept Cookies</button>
By continuing to use the site, you agree to the use of cookies. You can find out more by following <a href="https://www.express.co.uk/cookie-policy/amp" target="_blank">this link</a>
</div>
</amp-user-notification>
@adewale
adewale / gist:6e2baa8fdea65108b257fe9fbdae3b77
Created August 23, 2016 15:10
Common misconceptions about Progressive Web Apps
Common misconceptions about Progressive Web Apps
They have to be SPAs.
They have to live at pwa.*.com
They have to be mobile only.
They're not allowed to be responsive.
They have to use material design.
They only work in chrome.
They don't work in safari or on iOS.
They have to look like your android app.
package main
import (
"fmt"
"time"
"github.com/hako/durafmt"
)
func main() {
start := time.Date(2000, time.January, 1, 0,0,0,0,time.UTC)
@adewale
adewale / gist:125f0cb2cb46b6af916a2178064efcc8
Created May 21, 2016 15:21
How to use the Google AMP URL API
curl -X POST -H "Content-Type: application/json" -H "X-Goog-Api-Key: FAKE_API_KEY" -d "{urls: ['http://www.theguardian.com/artanddesign/2010/oct/26/eames-furniture-team-charles-ray', 'http://www.theguardian.com/artanddesign/2015/aug/09/millennium-mills-docklands-london-developers-catch-up-last-relic', 'http://www.buzzfeed.com/alexfinnis/places-in-london-every-instagram-lover-needs-to-visit', 'http://www.buzzfeed.com/christinalan/come-eat-dessert-with-me-forever-and-ever', 'http://www.theverge.com/2015/7/20/9002721/the-mobile-web-sucks', 'http://www.theverge.com/2016/5/20/11720352/netflix-gilmore-girls-new-episodes-title-poster', 'http://www.bbc.co.uk/news/election-us-2016-35694116', 'http://www.bbc.com/news/business-36301378']}" "https://acceleratedmobilepageurl.googleapis.com/v1/ampUrls:batchGet"
{
"ampUrls": [
{
"originalUrl": "http://www.bbc.com/news/business-36301378",
"ampUrl": "http://www.bbc.co.uk/news/amp/36301378",
"cdnAmpUrl": "https://cdn.ampproject.org/c/www.bbc.co.uk/news/