Skip to content

Instantly share code, notes, and snippets.

@johnalvero
johnalvero / llm-wiki.md
Created April 7, 2026 12:12 — 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.

@johnalvero
johnalvero / log4j_rce_detection.md
Created December 13, 2021 09:03 — forked from Neo23x0/log4j_rce_detection.md
Log4j RCE CVE-2021-44228 Exploitation Detection

log4j RCE Exploitation Detection

You can use these commands and rules to search for exploitation attempts against log4j RCE vulnerability CVE-2021-44228

Grep / Zgrep

This command searches for exploitation attempts in uncompressed files in folder /var/log and all sub folders

sudo egrep -I -i -r '\$(\{|%7B)jndi:(ldap[s]?|rmi|dns|nis|iiop|corba|nds|http):/[^\n]+' /var/log
#!/usr/bin/perl
# John Homer Alvero
# May 2016
# SESsender.pl
#
# Usage: cat input.csv | ./SESsender.ph
use MIME::Entity;
use Net::AWS::SES;
@johnalvero
johnalvero / jumpshell
Created November 16, 2014 09:10
jumpshell
#!/bin/bash
# SSH Menu for bastion servers
# John Alvero
# 2014 Nov 16
#
# To use, just set the user's shell to this script like so
# jump:x:100:100::/home/jump:/opt/bin/jumpshell
function valid_host()
{
#!/usr/bin/env perl
# Ubuntu: apt-get install libanyevent-aggressiveidle-perl liblinux-inotify2-perl libnet-amazon-s3-perl
use strict;
use warnings;
use utf8;
use AnyEvent;
use Linux::Inotify2;
use File::Find;
@johnalvero
johnalvero / vpcstart.sh
Last active December 24, 2015 19:59
Auto start/install Amavon VPC IPSec.
#!/bin/bash
#
# Setup a VPC IPSEC connectivity
# Oct 5, 2013
exec 2>&1
error() {
echo "$@" >&2
exit 1