Skip to content

Instantly share code, notes, and snippets.

@bultas
bultas / llm-wiki.md
Created April 5, 2026 16:54 — 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.

@bultas
bultas / linux-setup.sh
Created April 26, 2024 21:08 — forked from dhh/linux-setup.sh
linux-setup.sh
# CLI
sudo apt update -y
sudo apt install -y \
git curl docker.io \
build-essential pkg-config autoconf bison rustc cargo clang \
libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
libvips imagemagick libmagickwand-dev \
redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \
rbenv apache2-utils

Sentence Transformer Benchmark

Mix.install([
  {:bumblebee, github: "elixir-nx/bumblebee", ref: "23de64b1b88ed3aad266025c207f255312b80ba6"},
  {:nx, github: "elixir-nx/nx", sparse: "nx", override: true},
  {:exla, github: "elixir-nx/nx", sparse: "exla", override: true},
  {:axon, "~> 0.5.1"},
[
{
"id": 1,
"title": "ACTIVATE YOU BRD online",
"content": "Download the app on your phone and register online."
},
{
"id": 2,
"title": "INSTANT PAYMENTS AS FAST AS YOU",
"content": "Day or night, any transfer reaches an account instantly, between participating banks in the interbank payment system. Main benefits: you can transfer amounts smaller than 50,000 Lei the payment will be processed in maximum 20 seconds no differential commission you benefit from the service as an individual"
@bultas
bultas / frontmatter.ex
Created February 26, 2023 13:24 — forked from dsignr/frontmatter.ex
Parse frontmatter in Elixir
def extract(changeset) do
file_name = changeset.data.name
data = File.read!("#{@data_folder}/pages/#{file_name}")
case String.split(data, ~r/\n-{3,}\n/, parts: 2) do
[""] ->
%{frontmatter: nil, content: nil}
[frontmatter, content] ->
%{
frontmatter: parse_yaml(frontmatter),
content: content
# A Swagger 2.0 (a.k.a. OpenAPI) definition of the Engine API.
#
# This is used for generating API documentation and the types used by the
# client/server. See api/README.md for more information.
#
# Some style notes:
# - This file is used by ReDoc, which allows GitHub Flavored Markdown in
# descriptions.
# - There is no maximum line length, for ease of editing and pretty diffs.
# - operationIds are in the format "NounVerb", with a singular noun.
Afrikaans af
Albanian sq
Arabic (Algeria) ar-dz
Arabic (Bahrain) ar-bh
Arabic (Egypt) ar-eg
Arabic (Iraq) ar-iq
Arabic (Jordan) ar-jo
Arabic (Kuwait) ar-kw
Arabic (Lebanon) ar-lb
Arabic (Libya) ar-ly
@bultas
bultas / heroku-remote.md
Created July 1, 2020 13:03 — forked from randallreedjr/heroku-remote.md
Add a Heroku remote to an existing git repo

Working with git remotes on Heroku

Generally, you will add a git remote for your Heroku app during the Heroku app creation process, i.e. heroku create. However, if you are working on an existing app and want to add git remotes to enable manual deploys, the following commands may be useful.

Adding a new remote

Add a remote for your Staging app and deploy

Note that on Heroku, you must always use master as the destination branch on the remote. If you want to deploy a different branch, you can use the syntax local_branch:destination_branch seen below (in this example, we push the local staging branch to the master branch on heroku.

$ git remote add staging https://git.heroku.com/staging-app.git
@bultas
bultas / patternMatch.js
Created June 10, 2020 11:31
Pattern Match in javascript
import { cond, always, T, whereEq } from "ramda";
export const getProductPrice = cond([
[
whereEq({
type: "product1",
currency: "czk",
}),
({ price }) => `${price} Kc`,
],
@bultas
bultas / machine.js
Last active May 28, 2020 22:05
Generated by XState Viz: https://xstate.js.org/viz
const persooMachine = Machine({
id: "persoo",
initial: "initialize",
states: {
initialize: {
type: "parallel",
states: {
waitForPersooJS: {
initial: "fetching",
states: {