Skip to content

Instantly share code, notes, and snippets.

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.

@AlexeyKosov
AlexeyKosov / RunCommand.php
Created November 28, 2025 14:09
Runs all scheduler transports in a single messenger:consume worker
<?php
declare(strict_types=1);
namespace App\Command\Schedule;
use App\Command\ExclusiveCommand;
use Psr\Container\ContainerInterface;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
@oleg-andreyev
oleg-andreyev / WithConsecutive.php
Created July 20, 2023 14:50
WithConsecutive polyfill
<?php
/**
Usage: ->with(...WithConsecutive::create(...$withCodes))
*/
declare(strict_types=1);
namespace App\Tests;
@izzydoescode
izzydoescode / System Design.md
Created March 13, 2021 18:51 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@shmaltorhbooks
shmaltorhbooks / .bashrc
Last active October 24, 2025 13:10
paratest with multiple db instances
alias paratest='php bin/console test:init:database:pool -e=test 10 && vendor/bin/paratest -f -p 10 —max-batch-size 5 —coverage-html=build/coverage'
@vudaltsov
vudaltsov / FixPostgreSQLDefaultSchemaListener.php
Last active November 25, 2025 12:52
Doctrine PostgreSQL Default Schema Fix For Symfony
<?php
declare(strict_types=1);
namespace App\Doctrine\EventListener;
use Doctrine\DBAL\Schema\PostgreSQLSchemaManager;
use Doctrine\ORM\Tools\Event\GenerateSchemaEventArgs;
final class FixPostgreSQLDefaultSchemaListener
@afeish
afeish / md-renderer.conf
Created September 12, 2018 10:49 — forked from max-lt/md-renderer.conf
Nginx config to render markdown files (client side)
location /__special {
internal;
allow all;
root /usr/share/nginx/html/__special;
}
location = /__md_file {
internal;
allow all;
@holmberd
holmberd / php-pools.md
Last active November 13, 2025 10:56
Adjusting child processes for PHP-FPM (Nginx)

Adjusting child processes for PHP-FPM (Nginx)

When setting these options consider the following:

  • How long is your average request?
  • What is the maximum number of simultaneous visitors the site(s) get?
  • How much memory on average does each child process consume?

Determine if the max_children limit has been reached.

  • sudo grep max_children /var/log/php?.?-fpm.log.1 /var/log/php?.?-fpm.log
@insekticid
insekticid / phpcs.xml.dist
Created July 25, 2017 07:25
Custom Symfony 4 Flex PHP 7.1 strict_types=1 coding standard
<?xml version="1.0"?>
<ruleset name="Exploit.cz">
<exclude-pattern>src/Kernel.php</exclude-pattern>
<rule ref="vendor/escapestudios/symfony2-coding-standard/Symfony/ruleset.xml">
<exclude name="Symfony.WhiteSpace.AssignmentSpacing"/>
<exclude name="Symfony.Commenting.ClassComment"/>
<exclude name="Symfony.Commenting.FunctionComment"/>
<exclude name="Squiz.Commenting.FunctionComment"/>
</rule>
<rule ref="vendor/slevomat/coding-standard/SlevomatCodingStandard/ruleset.xml">