Skip to content

Instantly share code, notes, and snippets.

View romansklenar's full-sized avatar

Roman Sklenar romansklenar

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.

---
name: plan-exit-review
version: 2.0.0
description: |
Review a plan thoroughly before implementation. Challenges scope, reviews
architecture/code quality/tests/performance, and walks through issues
interactively with opinionated recommendations.
allowed-tools:
- Read
- Grep
@BretFisher
BretFisher / Docker Model Runner Reference.excalidraw.png
Last active July 26, 2026 09:14
Use Open WebUI with Docker Model Runner and Compose
Docker Model Runner Reference.excalidraw.png
@rameerez
rameerez / kamal-production-server-setup.sh
Last active August 11, 2026 13:43
Set up a Ubuntu 24.04/26.04 server to deploy Kamal 2.x Docker containers to, hardened security and production ready
#!/bin/bash
# ─────────────────────────────────────────────────────────────────────────────
# Production Docker Host Setup & Hardening Script — v3.1.0
# For Ubuntu Server 24.04 LTS (Noble) and 26.04 LTS (Resolute)
# Suitable for both Kamal 2.x deployment hosts and remote builder hosts
#
# Part of RailsFast (https://railsfast.com) — free & open source, MIT licensed.
#
# Usage (as root, on a fresh server):
@brianjbayer
brianjbayer / gist-unlocking-the-secrets-of-rails-secrets-and-credentials.md
Last active June 27, 2026 00:45
A comprehensive examination of Rails Secrets, Credentials, and Secret Key Base

Unlocking the Secrets of Rails Secrets and Credentials

Interurban Tunnel at Blackhand Gorge- Brian J Bayer


If you are like many (most?) of us, you have encountered Rails Credentials/Secrets and secret_key_base and may have been left a bit (or more) confused.

This post is an attempt to remove some of that confusion by

@mankind
mankind / rails-jsonb-queries
Last active March 30, 2026 13:03
Ruby on Rails-5 postgresql-9.6 jsonb queries
http://stackoverflow.com/questions/22667401/postgres-json-data-type-rails-query
http://stackoverflow.com/questions/40702813/query-on-postgres-json-array-field-in-rails
#payload: [{"kind"=>"person"}]
Segment.where("payload @> ?", [{kind: "person"}].to_json)
#data: {"interest"=>["music", "movies", "programming"]}
Segment.where("data @> ?", {"interest": ["music", "movies", "programming"]}.to_json)
Segment.where("data #>> '{interest, 1}' = 'movies' ")
Segment.where("jsonb_array_length(data->'interest') > 1")
@hakunin
hakunin / approach_01_random_ids.rb
Last active November 16, 2016 11:01
Prevent different records with matching IDs from falsely passing tests
# put this inside spec/support/random_ids.rb
# NOTE: this works, but will break tests whee something like Article.last is used
# a more clever approach is used in 02 below
# Some tests may pass when they should have failed
# due to Rails using sequential ids. This allows us
# to fix that by having random ids.
class ActiveRecord::Base
before_create :generate_random_id
@vitskvara
vitskvara / analyza.r
Created November 28, 2015 19:25
datafestak2015_R_workshop
library(stats)
library(forecast)
### DATALOAD ###
# nemocnice
pripady<-read.csv('fnhk_pripady.csv',header=T)
vykony<-read.csv('fnhk_vykony.csv',header=T)
zup<-read.csv('fnhk_zup.csv',header=T)
data_length<-nrow(pripady)
# PSC po okresech
@pixeltrix
pixeltrix / time_vs_datatime.md
Last active June 7, 2026 11:09
When should you use DateTime and when should you use Time?

When should you use DateTime and when should you use Time?

It's a common misconception that [William Shakespeare][1] and [Miguel de Cervantes][2] died on the same day in history - so much so that UNESCO named April 23 as [World Book Day because of this fact][3]. However because England hadn't yet adopted [Gregorian Calendar Reform][4] (and wouldn't until [1752][5]) their deaths are actually 10 days apart. Since Ruby's Time class implements a [proleptic Gregorian calendar][6] and has no concept of calendar reform then there's no way to express this. This is where DateTime steps in:

>> shakespeare = DateTime.iso8601('1616-04-23', Date::ENGLAND)
=> Tue, 23 Apr 1616 00:00:00 +0000
>> cervantes = DateTime.iso8601('1616-04-23', Date::ITALY)
=> Sat, 23 Apr 1616 00:00:00 +0000
@leighhalliday
leighhalliday / config.ru
Created February 17, 2015 16:15
Rack Example
# Use:
# This is in file config.ru
# 1) gem install rack
# 2) rackup
# 3) visit http://localhost:9292 in browser
# 4) Timer info will be in console
# 5) when changing code, will have to restart rackup
# Include rack
require 'rack'