Skip to content

Instantly share code, notes, and snippets.

@bbhenry
bbhenry / wiki-gen-skill.md
Created April 6, 2026 21:26 — forked from farzaa/wiki-gen-skill.md
personal_wiki_skill.md
name wiki
description Compile personal data (journals, notes, messages, whatever) into a personal knowledge wiki. Ingest any data format, absorb entries into wiki articles, query, cleanup, and expand.
argument-hint ingest | absorb [date-range] | query <question> | cleanup | breakdown | status

Personal Knowledge Wiki

You are a writer compiling a personal knowledge wiki from someone's personal data. Not a filing clerk. A writer. Your job is to read entries, understand what they mean, and write articles that capture understanding. The wiki is a map of a mind.

@bbhenry
bbhenry / llm-wiki.md
Last active April 6, 2026 05:50 — 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.

@bbhenry
bbhenry / script-template.sh
Created July 21, 2022 05:36 — forked from m-radzikowski/script-template.sh
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
# Nginx proxy for Elasticsearch + Kibana
# If you use this, you'll want to point config.js at http://FQDN:80/ instead of
# http://FQDN:9200
server {
listen *:80 ;
server_name kibana.myhost.org;
access_log /var/log/nginx/kibana.myhost.org.access.log;
- name: Get instance ec2 facts
action: ec2_facts
register: ec2_facts
- name: Get resource tags from ec2 facts
sudo: false
local_action: ec2_tag resource={{ec2_facts.ansible_facts.ansible_ec2_instance_id}} region=us-east-1 state=list
register: result
- name: Create CPU utilization metric alarm
@bbhenry
bbhenry / grid-extra-node
Last active August 29, 2015 14:23
Selenium Grid Extra Node Boxstarter Script
Disable-UAC
if (Test-PendingReboot) { Invoke-Reboot }
Update-ExecutionPolicy Unrestricted
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar
Enable-RemoteDesktop
Disable-InternetExplorerESC
$seleniumGridPath = "c:\SeleniumGrid"
$seleniumGridExtraDownloadUrl = "https://github.com/groupon/Selenium-Grid-Extras/releases/download/1.10.0/SeleniumGridExtras-1.10.0-SNAPSHOT-jar-with-dependencies.jar"
input {
file {
path => [ "/var/log/messages", "/var/log/kern.log" ]
type => "linux-syslog"
}
file {
path => "/var/log/apache2/access.log"
type => "apache-access"
}
@bbhenry
bbhenry / benchmark.sh
Last active August 29, 2015 13:57 — forked from ochronus/commands.sh
# install sysbench
$ apt-get install sysbench
# CPU benchmark, 1 thread
$ sysbench --test=cpu --cpu-max-prime=20000 run
# CPU benchmark, 64 threads
$ sysbench --test=cpu --cpu-max-prime=20000 --num-threads=64 run
# Disk benchmark, random read. See .fio files in this gist
@bbhenry
bbhenry / bash_template
Last active January 2, 2016 21:29
bash script template
#!/bin/bash
PROGNAME=`basename $0`
CRIT=15
WARN=30
usage() {
echo "$PROGNAME -H <FQDN> [-c <15>] [-w <30>]"
echo "-H Mandatory, please put the fully qualified domain name for the SSL Certificate you want to monitor"
echo "-c Default 15, the number of days left before it alerts for Critical state"
@bbhenry
bbhenry / gist:6198584
Created August 10, 2013 01:21
Perl_test_exit_code
system();
if ($? == -1) {
print "failed to execute: $!\n";
} elsif ($? & 127) {
printf "child died - signal %d, %s coredump\n",
($? & 127), ($? & 128) ? 'with' : 'without';
} else {
printf "child exited with value %d\n", $? >> 8;
}