Skip to content

Instantly share code, notes, and snippets.

View mawiswiss's full-sized avatar

Marc Wieland mawiswiss

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.

@JoeyBurzynski
JoeyBurzynski / Homebrew_How-to-Backup-and-Restore-Homebrew-Packages-2022.md
Last active September 11, 2026 18:32
Homebrew: How to Backup & Restore Homebrew Packages [2022, MacOS]

Homebrew: How to Backup & Restore Homebrew Packages

Homebrew makes it easy to install and keep installed software up to date on your Mac - as part of my backup routine for my Mac I want to be able to run a single command to reinstall all packages.

If you're searching on how to backup & restore Homebrew, then I assume you're here for the commands.

Brewfiles

Brewfiles are files generated with definitions that Homebrew reads and processes, a generated

@tkadlec
tkadlec / perf-diagnostics.css
Last active March 20, 2025 08:41
CSS used to highlight potential performance issues
:root {
--violation-color: red; /* used for clear issues */
--warning-color: orange; /* used for potential issues we should look into */
}
/* IMAGES */
/*
* Lazy-Loaded Images Check
* ====
@kingkool68
kingkool68 / use-remote-media.php
Last active January 20, 2026 17:37
Check if a local file exists in the WordPress media library and if it doesn't exist, replace the URL with a different URL. Helpful when working with a local site that doesn't have all of the media downloaded as the production site. See https://localwp.com/community/t/proxying-requests-to-wp-content-uploads-to-a-production-site/15701
<?php
// Put this in wp-config.php and replace https://example.com/ with the URL of the production site.
define( 'RH_USE_REMOTE_MEDIA_URL', 'https://example.com/' );
// Put the rest of this in functions.php or a custom plugin or somewhere else.
if ( defined( 'RH_USE_REMOTE_MEDIA_URL' ) && ! empty( RH_USE_REMOTE_MEDIA_URL ) ) {
add_filter( 'wp_get_attachment_image_src', 'filter_wp_get_attachment_image_src' );
add_filter( 'wp_calculate_image_srcset', 'filter_wp_calculate_image_srcset' );
add_filter( 'wp_get_attachment_url', 'filter_wp_get_attachment_url' );
}
@Jakobud
Jakobud / _poly-fluid-sizing.scss
Last active September 18, 2022 14:24
Poly Fluid Sizing using linear equations, viewport units and calc()
/// poly-fluid-sizing
/// Generate linear interpolated size values through multiple break points
/// @param $property - A string CSS property name
/// @param $map - A SASS map of viewport unit and size value pairs
/// @requires function linear-interpolation
/// @requires function map-sort
/// @example
/// @include poly-fluid-sizing('font-size', (576px: 22px, 768px: 24px, 992px: 34px));
/// @author Jake Wilson <jake.e.wilson@gmail.com>
@mixin poly-fluid-sizing($property, $map) {
@Shelob9
Shelob9 / caldera_forms_render_field_structure-change-default.php
Created December 22, 2016 17:23
Examples of using the Caldera Forms filter caldera_forms_render_field_structure to modify field display when rednering forms, see: https://calderaforms.com/doc/caldera_forms_render_field_structure/
<?php
/**
* Change the default for a dropdown to "red" if a specific user meta key is set for current user
*/
add_filter( 'caldera_forms_render_field_structure', function( $field_structure, $form ){
//make sure to change field ID to your field's ID here!
//not that $field_structure is not the same as field config, but that is stored in $field_structure[ 'field' ]
if( 0 != get_current_user_id() && 'fld_1234' == $field_structure[ 'field' ][ 'ID' ] ) {
if( 'red' == get_user_meta( get_current_user_id(), 'color', true ) ){
$field_structure[ 'default' ] = 'red';
@zeshanshani
zeshanshani / acf_options_multilingual.php
Last active December 10, 2025 12:51
Creates separate Advanced Custom Fields options pages for the specified languages.
<?php // Don't copy this line if you are inserting in a file that has it already.
/**
* ACF Options Page
*
* Instructions:
* Add more languages to the array below: $languages
*
* @author: Zeshan Ahmed <https://zeshanahmed.com/>
*/
@petertwise
petertwise / wp-cli-oneclick-install.sh
Last active February 3, 2025 13:00
Customized wordpress install script with WP CLI
#!/bin/bash
# Install Wordpress with Square Candy default using WP CLI
read -p 'Site URL (example.com): ' url
read -p 'Site Title: ' title
read -p 'WP Admin username: ' admin_user
read -sp 'WP Admin password: ' admin_password
read -p '
WP Admin email: ' admin_email
read -p 'Database name: ' dbname
read -p 'Database user: ' dbuser
anonymous
anonymous / heartbeat-api.php
Created March 17, 2016 12:57
Heartbeat-Schnittstelle von WordPress abschalten
<?php
// Heartbeat-Schnittstelle komplett abschalten
add_action('init', 'stop_heartbeat', 1);
function stop_heartbeat()
{
wp_deregister_script('heartbeat');
}
// Heartbeat-Schnittstelle außerhalb der Beiträge abschalten
@eyecatchup
eyecatchup / git-commit-log-stats.md
Last active April 14, 2026 19:34
Some commands to get git commit log statistics for a repository on the command line.

git commit stats

Commands to get commit statistics for a Git repository from the command line -
using git log, git shortlog and friends.