Skip to content

Instantly share code, notes, and snippets.

View jacobmc's full-sized avatar

Jacob McKinney jacobmc

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.

@justingivens
justingivens / gist:c56b6c18fa5f36e0bead096208af6e11
Created March 9, 2021 05:58
WP CLI Search-Replace to launch Production
#Export a SQL to use to move into Production
wp search-replace '{{DEVELOP_URL}}' '{{PRODUCTION_URL}}' --all-tables --export=production.sql
@justingivens
justingivens / create-posts.txt
Created June 26, 2017 15:43
WP-CLI - Generate Posts with different post dates and different content
for i in {10..1}; do custom_date=$(date -v-${i}d "+%Y-%m-%d") && curl http://loripsum.net/api/5/headers/ul/bq | wp post generate --post_content --count=1 --post_date=$custom_date; done
@magnetikonline
magnetikonline / dumprequest.php
Last active April 1, 2026 23:11
PHP script to dump full HTTP request to file (method, HTTP headers and body).
<?php
// https://gist.github.com/magnetikonline/650e30e485c0f91f2f40
class DumpHTTPRequestToFile {
public function execute($targetFile) {
$data = sprintf(
"%s %s %s\n\nHTTP headers:\n",
$_SERVER['REQUEST_METHOD'],
$_SERVER['REQUEST_URI'],
$_SERVER['SERVER_PROTOCOL']
@WebEndevSnippets
WebEndevSnippets / functions.php
Created March 3, 2014 19:50
Gravity Forms: Auto login to site after GF User Registration Form Submittal
add_action( 'gform_user_registered','we_autologin_gfregistration', 10, 4 );
/**
* Auto login to site after GF User Registration Form Submittal
*
*/
function we_autologin_gfregistration( $user_id, $config, $entry, $password ) {
wp_set_auth_cookie( $user_id, false, '' );
}
@gordonbanderson
gordonbanderson / PHP cleaner
Created February 27, 2012 09:01
Find leading and trailing space
<?php
/***********************
*@author: Ritesh Agrawal
*@description: Identifies php files that contain leading or trailing spaces before or after PHP opening or closings tags
*@version: 1.0
*@date: Nov 06, 2007
@todo – check only *.PHP or *.CTP files rather than checking all of the files
– html based output
***********************/
//Set Source Path
@ocean90
ocean90 / box-shadow.html
Last active January 30, 2026 20:04
CSS3 Box Shadow, only top/right/bottom/left and all
<!DOCTYPE html>
<html>
<head>
<title>Box Shadow</title>
<style>
.box {
height: 150px;
width: 300px;
margin: 20px;