Skip to content

Instantly share code, notes, and snippets.

View franky47's full-sized avatar

François Best franky47

View GitHub Profile
@franky47
franky47 / agentic-tooling.md
Last active May 12, 2026 17:17
2026-05-12 - Human Talks - Resources
name install-fast-deterministic-tools
description Install fast deterministic TypeScript/JS tooling (tsgo, bun, knip, oxc, fallow, agent-ci) and wire them into a pre-commit hook so agents get fast feedback and quality code lands in PRs. Use when user wants to set up an agentic validation loop, add deterministic guardrails, speed up CI/local checks, or replace slow tsc/eslint/prettier with native-speed equivalents.
author François Best <github@francoisbest.com>

Fast deterministic tools for agentic loops

Goal: give agents (and humans) instant feedback via deterministic, native-speed tools. Wire them into pre-commit so the agent self-corrects before a commit lands, and into CI as a safety net.

@franky47
franky47 / loadEnv.ts
Created January 6, 2026 18:47
loadEnv
import { loadEnvFile } from 'node:process'
export function loadEnv() {
const nodeEnv = process.env.NODE_ENV || 'development'
// Load in order of precedence
const files = [
`.env.${nodeEnv}.local`,
nodeEnv === 'test' ? null : `.env.local`,
`.env.${nodeEnv}`,
`.env`,
@franky47
franky47 / nuqs-waku-adapter.ts
Created November 9, 2025 12:40
Waku nuqs adapter
'use client'
import {
type unstable_AdapterOptions as AdapterOptions,
unstable_createAdapterProvider as createAdapterProvider,
renderQueryString
} from 'nuqs/adapters/custom'
import { useRouter } from 'waku'
function useNuqsAdapter() {
@franky47
franky47 / zod-codec-parsers.ts
Created August 27, 2025 12:27
Using Zod codecs with nuqs
import { createParser, useQueryState } from 'nuqs'
import { z } from 'zod'
export function createZodCodecParser<
Input extends z.ZodCoercedString<string>,
Output extends z.ZodType
>(
codec: z.ZodCodec<Input, Output>,
eq: (a: z.output<Output>, b: z.output<Output>) => boolean = (a, b) => a === b
) {
@franky47
franky47 / blogs-rss-feeds.txt
Last active January 7, 2026 09:03
Blogs RSS Feeds
ID: 8200971789968 – Title: Simon Willison's Weblog
URL: https://simonwillison.net/atom/everything/
ID: 7836475734291 – Title: Aurora Scharff
URL: https://aurorascharff.no/rss.xml
ID: 6042486240080 – Title: kettanaito.com
URL: https://kettanaito.com/blog/rss.xml
ID: 4896920722036 – Title: dispatches - Filippo Valsorda
@franky47
franky47 / index.html
Created February 11, 2025 11:06
Vanilla HTML URL state
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Vanilla</title>
</head>
<body>
<label style="display: flex; gap: 0.5rem; align-items: center">
<input type="range" id="slider" />
<span id="value"></span>
@franky47
franky47 / userChrome.css
Last active September 2, 2025 12:59
Minimalistic Firefox Nightly
#main-window {
min-width: 400px !important;
}
/* Hide the shield (tracking protection) icon */
#tracking-protection-icon-container {
display: none !important;
}
/* Hide site information (lock icon) */
@franky47
franky47 / sysex-queue.ino
Last active August 2, 2023 06:32
Message queue to print incoming SysEx
#include <MIDI.h>
#include <string.h>
MIDI_CREATE_DEFAULT_INSTANCE();
template<unsigned Size, typename DataType>
struct MessageQueue {
static constexpr unsigned sMask = Size - 1;
inline MessageQueue<Size, DataType>()
@franky47
franky47 / settings.json
Created February 17, 2022 01:15
VSCode experimental file nesting configuration
{
"explorer.experimental.fileNesting.enabled": true,
"explorer.experimental.fileNesting.patterns": {
"*.ts": "$(capture).js, $(capture).d.ts, $(capture).test.ts",
"*.js": "$(capture).js.map, $(capture).min.js, $(capture).d.ts, $(capture).test.js",
"*.jsx": "$(capture).js",
"*.tsx": "$(capture).ts, $(capture).*.ts, $(capture).*.tsx",
"tsconfig.json": "tsconfig.*.json",
"docker-compose.yml": "docker-compose.*.yml",
".env": ".env.*",
@franky47
franky47 / stripe-webhooks.ts
Created December 21, 2021 09:44
Strongly-typed webhook handlers for Stripe (Node.js)
import type { Stripe } from 'stripe'
export type StripeWebhookEventTypes =
Stripe.WebhookEndpointCreateParams.EnabledEvent
export type StripeWebhookEvent<
EventType extends StripeWebhookEventTypes,
Payload
> = {
eventType: EventType