Skip to content

Instantly share code, notes, and snippets.

View lai3d's full-sized avatar
🎯
Focusing

Larry Lai lai3d

🎯
Focusing
  • Singapore
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.

apiVersion: v1
kind: ConfigMap
metadata:
name: redis-config
data:
redis.conf: |
# Redis configuration file example.
#
# Note that in order to read the configuration file, Redis must be
# started with the file path as first argument:
@olegknyazev
olegknyazev / GenerateCircleMesh.cs
Last active October 9, 2022 02:31
Generation of a circle mesh (Unity)
private const int CircleSegmentCount = 64;
private const int CircleVertexCount = CircleSegmentCount + 2;
private const int CircleIndexCount = CircleSegmentCount * 3;
private static Mesh GenerateCircleMesh()
{
var circle = new Mesh();
var vertices = new List<Vector3>(CircleVertexCount);
var indices = new int[CircleIndexCount];
var segmentWidth = Mathf.PI * 2f / CircleSegmentCount;
@JaseHadd
JaseHadd / ioslocaleidentifiers.csv
Last active March 31, 2022 08:23 — forked from jacobbubu/ioslocaleidentifiers.csv
iOS Locale Identifiers
localeIdentifier Description
eu Basque
hr_BA Croatian (Bosnia & Herzegovina)
en_CM English (Cameroon)
rw_RW Kinyarwanda (Rwanda)
en_SZ English (Swaziland)
tk_Latn Turkmen (Latin)
he_IL Hebrew (Israel)
ar Arabic
uz_Arab Uzbek (Arabic)
@lai3d
lai3d / Output iOS Icons.jsx
Last active May 16, 2016 08:49 — forked from tlinkner/Output iOS Icons.jsx
Photoshop script to output iOS icons, now with iOS 9 sizes.
// Output iOS Icons.jsx
// 2014 Todd Linkner
// 2016 Larry Lai
// License: none (public domain)
// v1.3
//
// This script is for Photoshop CC 2015. It outputs iOS icons of the following
// sizes from a source 1024px x 1024px PSD
//
// [name]-29.png
@JaviLorbada
JaviLorbada / FRP iOS Learning resources.md
Last active June 7, 2026 09:24
The best FRP iOS resources.

Videos

@AlekseiCherkes
AlekseiCherkes / cpp_time_bomb
Last active November 15, 2024 23:05
C++ time bomb
#include <ctime>
#include <iostream>
#include <string>
#include <sstream>
//-----------------------------------------------------------------------------
// Notes:
// 1) You should make full project rebuild during customer build
// 2) Keep error handling simple: just print message to cout and call exit(-1)
// 3) You can customize the number of days in evaluation period:
@tedzhou
tedzhou / 我要学OC:objective-c的内存管理.md
Last active January 29, 2017 07:06
我要学OC:objective-c的内存管理.md

卤煮刚被web大潮淘汰到ios,当听说写oc要手动释放内存的时候如丧考妣,不过幸运的是ARC来了,妈妈再也不用担心我内存泄漏了。不过根据卤煮多年开发经验,和内存相关的不可能没有坑,开心之余还是得了解下oc是怎么搞内存的。

[TOC]

MRR和retainCount

OC对象都有一个属性 retainCount 表明这个对象还有几个引用, 当retainCount为0, 说明这个对象没人用了,runtime就会回收掉。而所谓的内存泄漏就是明明没人用了,retainCount却不是0,runtime没有回收掉这个对象。

retain and release

@jlndk
jlndk / Create iOS Icons.jsx
Last active May 16, 2016 07:06 — forked from twonjosh/Create iOS Icons.jsx
Combined 2 awesome script to make a batch ios icon exporter for photoshop. MSG Me for missing copyright (if there is a size you dont need, you can just comment those elements (add // in front of the line), and set the minSize varible to the size of your biggest export)
// Batch Export iOS Icons
// Copyright 2014
// Written by Jonas Lindenskov Nielsen (@jlndk)
//got parts of script from Jeffrey Tranberry (http://www.tranberry.com/photoshop/photoshop_scripting/PS4GeeksOrlando/IntroScripts/openFolder.jsx)
//got parts of script from Appsbynight on github (https://gist.github.com/appsbynight/3681050)
/*
Description:
This Script will export all of your files in a folder, to iOS Icons
@lai3d
lai3d / pptpd.sh
Created August 3, 2013 11:54 — forked from yinhm/pptpd.sh
# Automaticlly install pptpd on Amazon EC2 Amazon Linux
#
# Ripped from http://blog.diahosting.com/linux-tutorial/pptpd/
# pptpd source rpm packing by it's authors
#
# WARNING:
# first ms-dns setting to 172.16.0.23, 172.16.0.23 was showing on my
# /etc/resolv.conf, I'm not sure this is the same on all Amazon AWS zones.
#
# You need to adjust your "Security Groups" which you are using too.