Skip to content

Instantly share code, notes, and snippets.

View nikolavp's full-sized avatar

Nikola Petrov nikolavp

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.

blueprint:
name: Reset climate to manual when door is closed
description: >
When a door/window sensor is closed, set a climate device back to
manual mode. Intended as the companion to the "eco on door open" blueprint.
domain: automation
input:
door_sensor:
name: Door/Window Sensor
description: The binary sensor that detects if the door is open.
@aslakknutsen
aslakknutsen / start_testing_java8_today.asciidoc
Last active August 3, 2025 16:31
Example of how to use both JDK 7 and JDK 8 in one build.

JDK 8 Released

Most of us won’t be able to use/deploy JDK 8 in production for a looong time. But that shouldn’t stop us from using it, right?

It should be possible to sneak in JDK 8 in the back way, the same way we snuck in Groovy and other libraries we wanted to use.

The Test Suite to the rescue

The Maven compiler plugin run in two separate lifecycles, compile and testCompile. Those can be configured separately.

root@puppetdb1:/var/lib/puppet# rm -rf ssl
root@puppetdb1:/var/lib/puppet# rm -rf /etc/puppetdb/ssl
root@puppetdb1:/var/lib/puppet# puppet cert generate `facter -p fqdn` # you can use --dns_alt_names=<hostname,hostname2> to add extra cert aliases as well
Notice: Signed certificate request for ca
Notice: Rebuilding inventory file
Notice: puppetdb1.vm has a waiting certificate request
Notice: Signed certificate request for puppetdb1.vm
Notice: Removing file Puppet::SSL::CertificateRequest puppetdb1.vm at '/var/lib/puppet/ssl/ca/requests/puppetdb1.vm.pem'
Notice: Removing file Puppet::SSL::CertificateRequest puppetdb1.vm at '/var/lib/puppet/ssl/certificate_requests/puppetdb1.vm.pem'
root@puppetdb1:/var/lib/puppet# puppetdb-ssl-setup -f
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active August 12, 2026 20:02
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh