Skip to content

Instantly share code, notes, and snippets.

View bookchiq's full-sized avatar

Sarah Lewis bookchiq

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.

@bookchiq
bookchiq / update_buddypress_avatar_from_external_url.php
Created June 5, 2023 17:46
Update a BuddyPress/BuddyBoss avatar from an external URL
<?php
/**
* Updates the avatar of a user based on the user's ID.
*
* This function downloads an image from an external URL and saves it
* as the user's avatar. If the image is not square, it crops it to a
* square shape before saving.
*
* @since 1.0.0
* @access public
@meg-gutshall
meg-gutshall / quotes.txt
Last active May 8, 2026 14:24
A file of quotes that bring me joy and inspiration
"Reading is to the mind what exercise is to the body." —Joseph Addison
"You gotta learn how to do something wrong before you can do it right." —David Alpert
"Being nice doesn't take much time." —Marie Antons
"If you have to ask what jazz is, you'll never know." —Louis Armstrong
"In dreams and in love, there are no impossibilities." —Janos Arnay
"Forethought spares afterthought." —Amelia Barr
"Do not seek to follow in the footsteps of the men of old; seek what they sought." —Matsuo Basho
"Believe in yourself. You are braver than you think, more talented than you know, and capable of more than you imagine." —Roy T. Bennett
"Nobody likes getting up early, but everyone likes having gotten up early." —Stephen Blais
"The only wrong first step is not taking the first step." —Stephen Blais
@tabakerov
tabakerov / struthless-journaling-tips.md
Created August 5, 2021 13:47
Struthless' tips for journaling

https://www.youtube.com/watch?v=dArgOrm98Bk

Clarity

Just dump everything from mind

Breaking your mindset

  • Imagine 6 impossible things
  • How can I make someone else happy right now?
  • What's something in my immediate environment that I have never noticed?
@karlhillx
karlhillx / macos_big_sur_homebrew_apache_php_mariadb_2020.md
Last active January 23, 2025 10:27
macOS Big Sur 11.0 Setup: Homebrew + Apache + PHP + MariaDB (Regularly updated)

macOS Big Sur 11.0 Setup: Homebrew + Apache + PHP + MariaDB

This document helps get your macOS development environment up and running with the latest versions of Homebrew, Apache, PHP, and MariaDB.

@bookchiq
bookchiq / delete_orphaned_postmeta.sql
Created July 10, 2020 17:02
SQL to delete orphaned postmeta in WordPress
DELETE pm
FROM wp_postmeta pm
LEFT JOIN wp_posts wp ON wp.ID = pm.post_id
WHERE wp.ID IS NULL
@ben-heath
ben-heath / facetwp-template-display-if-facet-selected.php
Last active June 9, 2022 19:07
FacetWP - show template only if a facet is selected
<?php
/* This code goes into your child theme's function.php file
* Or it can use FacetWP's recommendation and use a plugin https://facetwp.com/how-to-use-hooks/
*
* I found that the tutorial on FacetWP's site didn't function how I wanted it to.
* https://facetwp.com/how-to-hide-the-template-until-facets-are-selected/
* Their method doesn't allow a template to show if you use a link with a url query, indicating a facet selection, it only works if
* if you 'click' on the page. So I came up with some JS that looks at the facet list, and looks for any 'checked' items.
* This way, whether it was clicked while on the page, or you linked to the page with a query string selection, it still works as I wanted.
*/
@FesoVel
FesoVel / WordPress - Insert HTML In Header
Created January 4, 2019 12:48
How to add html code to WordPress <head> using wp_head hook.
function insert_html_in_header() {
echo '<<< html here >>>';
}
/* Admin Dashboard */
add_action( 'admin_head', 'insert_html_in_header' );
/* Front End */
add_action( 'wp_head', 'insert_html_in_header' );
@akamyshanov
akamyshanov / gmail-auto-archive.js
Created September 18, 2018 09:29
GMail Auto Archive script for Google Scripts
function gmailAutoarchive() {
var threads = GmailApp.search("in:inbox label:auto-archive older_than:2d");
Logger.log("found " + threads.length + " threads:");
for(var i = 0; i < threads.length; i++) {
var thread = threads[i];
Logger.log((i+1) + ". " + thread.getFirstMessageSubject());
}
var batch_size = 100;
@dinvlad
dinvlad / pre_request.js
Last active September 1, 2025 09:41
Auto-generate Google Access and ID tokens from a Service Account key and save it in Postman
/* This script auto-generates a Google OAuth token from a Service Account key,
* and stores that token in accessToken variable in Postman.
*
* Prior to invoking it, please paste the contents of the key JSON
* into serviceAccountKey variable in a Postman environment.
*
* Then, paste the script into the "Pre-request Script" section
* of a Postman request or collection.
*
* The script will cache and reuse the token until it's within