Skip to content

Instantly share code, notes, and snippets.

View CyberAstronaut101's full-sized avatar
๐ŸŽ†

Elliot Mason CyberAstronaut101

๐ŸŽ†
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.

class Node:
def __init__(self, name, capacity, flow=0, is_arrow_head=False):
self.name = name
self.capacity = capacity
self.flow = flow
self.is_arrow_head = is_arrow_head
class Edge:
def __init__(self, start_node, end_node, capacity, is_bidirectional=False):
@CyberAstronaut101
CyberAstronaut101 / gen_signed_cf_image_url.py
Created May 25, 2023 20:15
Python code for generating signed urls for Cloudflare Image API
import time
import hmac
import hashlib
from urllib.parse import urlparse, parse_qs, urlencode, urlunparse
# Given test private URL for private image we need to sign
KEY = 'KEY-FROM-CF-IMAGE-DAHSBOARD'
PRIVATE_URL = 'https://imagedelivery.net/abc123/abc123/public'
EXPIRATION = 60 * 60 * 24 # 24 hours in seconds
@CyberAstronaut101
CyberAstronaut101 / pixieset-scrape.js
Created August 15, 2022 02:41 — forked from antiops/pixieset-scrape.js
pixieset.com dumper
/* pixieset.com full size image scraper
*
* Rips all images in highest quality
*
* To use scroll to the very bottom of the album and press F12 then paste the below snippet in and press enter.
* The full file list will be copied to your clipboard afterwards. You can use jdownloader to easily download the full list.
*/
(() => {
const data = document.querySelectorAll('.masonry-brick img')
@CyberAstronaut101
CyberAstronaut101 / contracts...Pronouns.sol
Created August 28, 2021 22:08
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.4+commit.c7e474f2.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
::==========================================================
:: Elliot Mason - Computer Forensics - Lab 02
:: Computer Information Collection Script
::==========================================================
:: Set script variables here
@echo off
SET seperator=========================================================
SET SystemInfo="System_Info.txt"
========================================================
systeminfo
========================================================
Host Name: CSCE-2020-062
OS Name: Microsoft Windows 10 Enterprise LTSC
OS Version: 10.0.17763 N/A Build 17763
OS Manufacturer: Microsoft Corporation
OS Configuration: Member Workstation
OS Build Type: Multiprocessor Free
========================================================
net user
========================================================
User accounts for \\CSCE-2020-062
-------------------------------------------------------------------------------
Administrator DefaultAccount Guest
ineg-admin WDAGUtilityAccount
The command completed successfully.
========================================================
ipconfig /all
========================================================
Windows IP Configuration
Host Name . . . . . . . . . . . . : csce-2020-062
Primary Dns Suffix . . . . . . . : uark.edu
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
@CyberAstronaut101
CyberAstronaut101 / customtheme.zsh-theme
Created August 9, 2019 20:42
custom oh-my-zsh theme
source /home/masonel/.oh-my-zsh/scripts/kube-ps1.sh
LINE_DIVIDER_='$FG[237]${(l.COLUMNS..-.)}'
# Grab the current date (%D) and time (%T) wrapped in {}: {%D %T}
CURRENT_TIME_="%{$fg[white]%}{%{$fg[yellow]%}%D %T%{$fg[white]%}} %{$reset_color%}"
# Grab the current machine name
CURRENT_MACH_="%{$FG[154]%}%m%{$fg[white]%} %{$reset_color%}"
# Define Custom Color Variables