Skip to content

Instantly share code, notes, and snippets.

View Preen's full-sized avatar

Philip Mannheimer Preen

  • SkimSafe
  • Stockhollm, Sweden
View GitHub Profile
@Preen
Preen / llm-wiki.md
Created August 27, 2026 07:03 — 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.

@Preen
Preen / Setup WP on ubuntu
Last active August 31, 2017 13:50
Setup wp on ubuntu
sudo su
curl -O https://wordpress.org/latest.tar.gz
tar xzvf latest.tar.gz
rm latest.tar.gz
cd wordpress
mv * ../
cd ..
rmdir wordpress
cd ..
defmodule Todo.Application do
# See http://elixir-lang.org/docs/stable/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
def start(_type, _args) do
import Supervisor.Spec, warn: false
defmodule Read do
def read do
case File.read("sample.txt") do
{ :ok, body } ->
String.split(body, "\n")
|> Stream.filter(&String.starts_with?(&1, "d"))
|> Enum.sort(&(byte_size(&1) >= byte_size(&2) ))
|> Stream.each(&IO.puts(String.capitalize(&1)))
|> Stream.run
{ :error, reason } ->
@Preen
Preen / deploy-wordpress-on-different-env-with-gulp-rsync.js
Last active September 27, 2016 15:59
Deploy Wordpress on different staging env. with Gulp Rsync and chmod it accordingly.
var argv = require('minimist')(process.argv);
var gulpif = require('gulp-if');
var prompt = require('gulp-prompt');
var rsync = require('gulp-rsync');
var chmod = require('gulp-chmod');
var sequence = require('run-sequence');
gulp.task('create_dist', function(){
// Add your paths here.
var paths = [
es:
buttons:
share: "Compartir en %{social_media}"
errors:
not_found_header: Oh no!
not_found_description: Nos parece que no puede encontrar la página que está buscando.
not_found_home_link: "Por favor, llévame a la página principa"
header:
ad: Ad
by: Por
@Preen
Preen / Turbolinks playing nice with Bugherd
Created December 10, 2015 10:31
A solution for Bugherd to play nice with Turbolinks. Otherwise you might get errors and the sidebar wont show up.