Skip to content

Instantly share code, notes, and snippets.

View tairov's full-sized avatar

Aydyn Tairov tairov

  • London, UK
View GitHub Profile
@tairov
tairov / llm-wiki.md
Created April 22, 2026 21:25 — 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.

@tairov
tairov / curl-pod.yaml
Created October 23, 2025 11:39
just pod with curl
cat <<EOF | kubectl create -f -
apiVersion: apps/v1
kind: Deployment
metadata:
name: curl
spec:
replicas: 1
selector:
matchLabels:
app: curl
@tairov
tairov / sq.io.sh
Created October 6, 2024 23:06
sq.io shell in a k8s pod
# Start pod named "sq-shell".
$ kubectl run sq-shell --image ghcr.io/neilotoole/sq
# Shell into the pod.
$ kubectl exec -it sq-shell -- zsh
# ffmpeg -i "$1" -vcodec h264 -threads 10 "$2"
process_mov_files() {
{
find . -name "*.mov" -print0 | while read -d $'\0' file
do
{
NEW_NAME="$(echo "${file%.mov}" | sed 's/[ _]/-/g' | tr '[:upper:]' '[:lower:]')"
ffmpeg -i "$file" -vcodec h264 -threads 10 -f mp4 "${NEW_NAME}.mp4"
} < /dev/null
while true; do printf 'HTTP/1.1 200 OK\n\n%s' "pong $(date)" | nc -l 8888; done
* To use Docker, the Docker daemon must be running as root. To automatically
* start the Docker daemon at boot, add Docker to the default runlevel:
* rc-update add docker default
* Similarly for systemd:
* systemctl enable docker.service
*
* To use Docker as a non-root user, add yourself to the 'docker' group:
* usermod -aG docker youruser
@tairov
tairov / video_cut.sh
Created April 30, 2019 13:52
cut video with ffmpeg
#!/usr/bin/env bash
# INPUT_SRC=input.mp4
INPUT_SRC=input.mp4
START_TIME=00:39:51
END_TIME=00:40:29
echo Start processing
ffmpeg -ss $START_TIME -i $INPUT_SRC -acodec copy -vcodec copy -c copy -to $END_TIME output2.mp4
INPUT_SRC=$(youtube-dl -f best -g 'https://www.youtube.com/watch?v=wnHW6o8WMas')
ffmpeg -ss 00:01:22 -i $INPUT_SRC -vframes 1 -q:v 2 output.jpg
# shared library
// mylib/vars/myGitlabStage.groovy
call (String _stage, Closure _closure, String _label = 'master') {
stage(_stage) {
node (_label) {
gitlabCommitStatus(name: _stage ) {
_closure()
}
} // node
[main] "stdout_lines": [
[main] "JENKINS_HOME=/opt/jervis/../my_jenkins_home",
[main] "GIT_PREVIOUS_SUCCESSFUL_COMMIT=2287deab5c65f0597650ec7f83f779883ae4c5a0",
[main] "ENVIRONMENT_NAME=dev",
[main] "MAIL=/var/mail/jenkins",
[main] "USER=jenkins",
[main] "RUN_CHANGES_DISPLAY_URL=http://localhost:8080/page=changes",
[main] "HUDSON_URL=http://localhost:8080/",
[main] "NODE_LABELS=ansible docker docker-local-dace45f6a860 linux stable",
[main] "GIT_COMMIT=c690358ed6678d11fe96684690ab00c103c218c3",