Skip to content

Instantly share code, notes, and snippets.

View erkobridee's full-sized avatar

Erko Bridee erkobridee

View GitHub Profile

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

@iTrooz
iTrooz / logger.ts
Last active May 20, 2026 18:57
Automatically use pino-pretty in Cloudflare Workers
// Automatically use pino-pretty if available in Cloudflare Workers
// Note that pino-pretty needs to be installed in prod too with this solution, but it will not be used
// https://gist.github.com/iTrooz/179e498d181f811ec6ebc30396a73f51
import { pino, type DestinationStream } from "pino";
import { Writable } from "stream";
import pinoPretty from "pino-pretty";
// Setup pino logger, using pino-pretty if available (should only be used for dev, not prod !)
export function setupLogger() {
// See later
@takunagai
takunagai / tailwind-v4-guide.md
Last active November 12, 2026 21:13
[Tailwind CSS v3 to v4 Migration Guide: Optimized for AI Understanding] #tailwindcss #windsurf

Tailwind CSS v3 to v4 Migration Guide

This document provides a comprehensive guide to help you understand and migrate from Tailwind CSS v3 to v4. It focuses on code-level changes with clear examples showing both v3 and v4 equivalents.

Browser Compatibility Note: Tailwind CSS v4.0 is designed for Safari 16.4+, Chrome 111+, and Firefox 128+. If you need to support older browsers, stick with v3.4 until your browser support requirements change.

Installation Changes

Simplified Installation (v3 vs v4)

/*
useful references:
https://github.com/erkobridee/lab-pdf-lib/blob/83ef7e53e61227cef4293a6294979b1e551a3603/src/helpers/random.js#L4
https://github.com/erkobridee/nx-todos/blob/1647f66518a6def9ddf7569ca7a2b6397337d09c/libs/shared/helpers/src/lib/values.ts#L25
https://github.com/erkobridee/gatsby-typescript-app-starter/blob/5a7bcfbbe6ff014ecb360da35a3e8255fe80bf9e/src/helpers/values.ts#L21
https://gist.github.com/rubinchyk/46d9868e2eb86d744abcb83b5b6d8d29
import { useMouse } from '@uidotdev/usehooks';
import * as React from 'react';
interface Positions {
/* Sub-menu height */
h: number;
/* Mouse x */
mouseX: number;
/* Mouse y */
mouseY: number;
@erkobridee
erkobridee / ts-use_consts_instead_of_enums.ts
Last active September 26, 2025 05:35
a sample code of how to use const as const instead of enums in TypeScript
/*
from:
Enums considered harmful | Matt Pocock
https://www.youtube.com/watch?v=jjMbPt_H3RQ
*/
const LogLevel = {
DEBUG: "DEBUG",
INFO: "INFO",

"Any sufficiently advanced technology is indistinguishable from magic." by - Arthur C. Clarke | CCCB LAB

Arthur C. Clarke was a scientist, science writer and author of science fiction stories and novels. This quote of his reflects on the early beginnings of technology and offers us a way of linking up the two exhibitions that have been held this year at the CCCB: Black Light and Stanley Kubrick.

this quote it's also refered on [YouTube] Why Magic Systems don't feel Magical | Tale Foundry - 2023/05/31

Learning

@steven-tey
steven-tey / title-from-url.ts
Last active November 13, 2025 06:54
Get Title from URL
// Note: this gist is a part of this OSS project that I'm currently working on: https://github.com/steven-tey/dub
export default async function getTitleFromUrl (url: string) {
const controller = new AbortController();
const timeoutId = setTimeout(() => controller.abort(), 2000); // timeout if it takes longer than 2 seconds
const title = await fetch(url, { signal: controller.signal })
.then((res) => {
clearTimeout(timeoutId);
return res.text();
})