Skip to content

Instantly share code, notes, and snippets.

View kakopappa's full-sized avatar
🏠
Working from home

Aruna Tennakoon kakopappa

🏠
Working from home
View GitHub Profile
@kakopappa
kakopappa / llm-wiki.md
Created April 27, 2026 00:53 — 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.

Cursor's Memory Bank

I am Cursor, an expert software engineer with a unique characteristic: my memory resets completely between sessions. This isn't a limitation - it's what drives me to maintain perfect documentation. After each reset, I rely ENTIRELY on my Memory Bank to understand the project and continue work effectively. I MUST read ALL memory bank files at the start of EVERY task - this is not optional.

Memory Bank Structure

The Memory Bank consists of required core files and optional context files, all in Markdown format. Files build upon each other in a clear hierarchy:

flowchart TD
@kakopappa
kakopappa / claude-code-tools.md
Created August 28, 2025 04:45 — forked from wong2/claude-code-tools.md
Tools and system prompt of Claude Code

Task

Launch a new agent that has access to the following tools: Bash, Glob, Grep, LS, exit_plan_mode, Read, Edit, MultiEdit, Write, NotebookRead, NotebookEdit, WebFetch, TodoRead, TodoWrite, WebSearch. When you are searching for a keyword or file and are not confident that you will find the right match in the first few tries, use the Agent tool to perform the search for you.

When to use the Agent tool:

  • If you are searching for a keyword like "config" or "logger", or for questions like "which file does X?", the Agent tool is strongly recommended

When NOT to use the Agent tool:

  • If you want to read a specific file path, use the Read or Glob tool instead of the Agent tool, to find the match more quickly
  • If you are searching for a specific class definition like "class Foo", use the Glob tool instead, to find the match more quickly
  • If you are searching for code within a specific file or set of 2-3 files, use the Read tool instead of the Agent tool, to find the match more quickly
@kakopappa
kakopappa / rate-limiting-queue.js
Created August 23, 2023 02:32 — forked from samsonjs/rate-limiting-queue.js
Basic rate limiting queue for node
//// Usage
var queue = createMessageQueue({ messagesPerMinute: 60 })
queue.on('message', function(msg) {
console.log('message: ' + JSON.stringify(msg, null, 2))
})
queue.enqueue({ to: 'avian', from: 'sjs', body: 'cool story bro' })
@kakopappa
kakopappa / install_go_pi.sh
Created June 6, 2023 10:50 — forked from pcgeek86/install_go_pi.sh
Install Go Lang on Raspberry Pi
cd $HOME
FileName='go1.13.4.linux-armv6l.tar.gz'
wget https://dl.google.com/go/$FileName
sudo tar -C /usr/local -xvf $FileName
cat >> ~/.bashrc << 'EOF'
export GOPATH=$HOME/go
export PATH=/usr/local/go/bin:$PATH:$GOPATH/bin
EOF
source ~/.bashrc
@kakopappa
kakopappa / name-cheap-dynamic-dns.sh
Created June 3, 2023 04:24 — forked from Goddard/name-cheap-dynamic-dns.sh
auto update ip script for dynamic dns
curl -i -H "Accept: application/xml" -H "Content-Type: application/xml" -X GET https://dynamicdns.park-your-domain.com/update?host=@&domain=[domain]&password=[update-password]&ip=[local-ip]
@kakopappa
kakopappa / build_nginx_with_lua.sh
Last active April 8, 2023 09:39 — forked from kanna5/build_nginx_with_lua.sh
A simple script to build nginx with lua support
#!/bin/sh
# Script to build nginx with lua support.
# XXX: The result might work, but it was not thoroughly tested. Use it at your
# own risk. If you really need nginx with LUA in production, you should use
# OpenResty instead.
NGINX_VERSION='1.20.2'
NGX_DEVEL_KIT_VERSION='0.3.1'
@kakopappa
kakopappa / build_nginx_with_lua.sh
Created April 7, 2023 06:07 — forked from riskiwah/build_nginx_with_lua.sh
A simple script to build nginx with lua support
#!/bin/sh
# Script to build nginx with lua support.
NGINX_VERSION='1.18.0'
NGX_DEVEL_KIT_VERSION='0.3.1'
LUA_NGINX_MODULE_VERSION='0.10.16rc5'
STREAM_LUA_NGINX_MODULE_VERSION='0.0.8rc3'
# we use openresty's version of luajit here.
@kakopappa
kakopappa / build-complete.txt
Created September 25, 2021 02:08 — forked from welshstew/build-complete.txt
Generating and using ssl client certificates for use in an nginx sidecar image
[user@localhost certs]$ oc get builds
NAME TYPE FROM STATUS STARTED DURATION
nodejs-mongo-persistent-1 Source Git@e59fe75 Complete About an hour ago 2m37s
simple-nginx-ssl-reverseproxy-1 Source Git@552932f Complete 16 minutes ago 47s
@kakopappa
kakopappa / ChangeReport.json
Created March 29, 2021 09:58 — forked from sivar2311/ChangeReport.json
ContactSensor-AlexaJSON
{
"context": {},
"event": {
"header": {
"messageId": "cedd4af3-a6ce-4e13-9c72-6bed87261eb6",
"namespace": "Alexa",
"name": "ChangeReport",
"payloadVersion": "3"
},
"endpoint": {