Skip to content

Instantly share code, notes, and snippets.

@llimllib
llimllib / count.py
Last active August 9, 2025 13:47
show all the PRs and issues you've filed on different repos
# 1. set GH_TOKEN to be a valid github API token. I used `GH_TOKEN=$(gh auth)` to set it
# 2. run `python count.py <username>`
#
# This script will print out each repository you've filed a PR on or submitted an issue to,
# and a link to no more than 5 of them
import sys
import os
import json
import urllib.request
import urllib.error
#!/usr/bin/env node
const { readFileSync } = require('node:fs');
const { tags, mdast } = require('./dist/main.node.js');
async function main() {
const { visit } = await import('unist-util-visit');
// we actually fail to parse our own README?
// const data = readFileSync('README.md');
const data = readFileSync('test.md').toString();
$ python test.py
creating random ASNs: 0.2386
text between: 3.6064 277.28 selects / sec
text lt/gt: 3.3486 298.63 selects / sec
blob between: 3.9639 252.28 selects / sec
blob lt/gt: 3.7149 269.19 selects / sec
blob intersect: 13.3162 75.10 selects / sec
int between: 2.2569 443.08 selects / sec
int lt/gt: 2.2536 443.74 selects / sec
@llimllib
llimllib / Makefile
Last active October 1, 2024 17:33
comparing sqlite in C to sqlite libraries in go
run-bench: clean bench
./bench /tmp/test.sqlite
bench:
clang -o bench -lsqlite3 -g sqlite.c
clean:
rm -f bench /tmp/test.sqlite
@llimllib
llimllib / index.html
Last active September 30, 2024 15:29
attempt at a basic guitar tuner
<!doctype html>
<html>
<head>
<title>Frequency Domain Visualization</title>
<style>
canvas {
border: 1px solid black;
}
</style>
package db
import (
"context"
"database/sql"
"fmt"
"log/slog"
"net/url"
"os"
"runtime"
@llimllib
llimllib / index.html
Created September 26, 2024 18:03
minimal web spectrometer
<!doctype html>
<html>
<head>
<title>Frequency Domain Visualization</title>
<style>
canvas {
border: 1px solid black;
}
</style>
</head>
$ curl https://www.maine.gov/ifw/hunting-trapping/hunting/laws-rules/season-dates-bag-limits.html |
llm -s "convert all the dates on this web page into an ICS file appropriate for import into google calendar"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 45888 0 45888 0 0 314k 0 --:--:-- --:--:-- --:--:-- 313k
Here is an ICS file containing all the date information from the webpage:
```
BEGIN:VCALENDAR
VERSION:2.0
../api/node_modules/stripe/types/Tax/RegistrationsResource.d.ts:1224:20 - error TS2300: Duplicate identifier 'PlaceOfSupplyScheme'.
1224 type PlaceOfSupplyScheme = 'small_seller' | 'standard';
~~~~~~~~~~~~~~~~~~~
../../node_modules/stripe/types/Tax/RegistrationsResource.d.ts:345:20
345 type PlaceOfSupplyScheme = 'small_seller' | 'standard';
~~~~~~~~~~~~~~~~~~~
'PlaceOfSupplyScheme' was also declared here.
../../node_modules/stripe/types/Tax/RegistrationsResource.d.ts:379:20
commit-style = raw
file-style = blue
hunk-header-style = syntax
minus-style = normal "#3f0001"
minus-non-emph-style = normal "#3f0001"
minus-emph-style = normal "#901011"
minus-empty-line-marker-style = normal "#3f0001"
zero-style = syntax
plus-style = syntax "#002800"
plus-non-emph-style = syntax "#002800"