Skip to content

Instantly share code, notes, and snippets.

View notcod's full-sized avatar
💭
I may be slow to respond.

notcod

💭
I may be slow to respond.
View GitHub Profile
@notcod
notcod / README.md
Last active March 20, 2024 16:34
Qwik clientAction$

Browser form action. When you need to submit form but you don't want to send request to server with regular routeAction$ Doesn't work when js disabled.

//import Logo from '../assets/logo.png?jsx';
//<Logo/>
function ImageJSX() {
const supportedExtensions = ['.jpg', '.jpeg', '.png', '.webp', '.gif', '.avif', '.tiff'];
return {
name: 'my-plugin',
transform(code: any, id: any) {
const parseId = (originalId: string) => {
const [pathId, query] = originalId.split('?');
const queryStr = query || '';
const puppeteer = require('puppeteer');
const nodemailer = require('nodemailer');
class Webpage {
static async generatePDF(url) {
const browser = await puppeteer.launch({ headless: true }); // Puppeteer can only generate pdf in headless mode.
const page = await browser.newPage();
await page.goto(url, { waitUntil: 'networkidle', networkIdleTimeout: 5000 }); // Adjust network idle as required.
const pdfConfig = {
format: 'A4',
@notcod
notcod / routes.tsx
Created July 18, 2024 08:25
routes.tsx
import { generatePreservedRoutes, generateRegularRoutes } from '@generouted/react-router/core';
import { createBrowserRouter, Outlet, RouterProvider } from 'react-router-dom';
import type { RouteObject } from 'react-router-dom';
import { Fragment } from 'react';
type Module = { default: () => JSX.Element; Catch?: () => JSX.Element };
const patterns = {
route: [/^.*\/src\/pages\/|\.(jsx|tsx|mdx)$/g, ''],
splat: [/\[\.{3}\w+\]/g, '*'],
@notcod
notcod / llm-wiki.md
Created July 3, 2026 01:22 — forked from karpathy/llm-wiki.md
llm-wiki

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.