Skip to content

Instantly share code, notes, and snippets.

$ 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"
@llimllib
llimllib / _example output
Last active September 5, 2024 02:35
Printing a reasonable table in javascript when it includes ansi escapes
┌───────────┬────────────────────┬───────┐
│ id │ name │ type │
├───────────┼────────────────────┼───────┤
│ abc123xyz │ something │ web │
│ abc124xyz │ something else │ web │
│ abc125def │ Martin Luther King │ pserv │
│ abc126xyz │ Abraham Lincoln │ web │
└───────────┴────────────────────┴───────┘
$ ./test.sh
node version: v22.4.0
python version: Python 3.12.2
go version: go version go1.22.6 darwin/arm64
rg version: ripgrep 14.1.0
features:-simd-accel,+pcre2
simd(compile):+NEON
simd(runtime):+NEON