Skip to content

Instantly share code, notes, and snippets.

View behumble's full-sized avatar

Alan Goo behumble

View GitHub Profile
@behumble
behumble / llm-wiki.md
Created July 12, 2026 11:21 — 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.

@behumble
behumble / ForLoop.java
Created October 19, 2019 01:40
Java for-each loop which doesn't compile
public class ForLoop {
public static void main(String[] args) {
for(char c : "Hello") {
System.out.println(c);
}
}
}
@behumble
behumble / OutlineDoubleEntry.java
Created July 18, 2018 09:47
Multiple Outline Objects
package com.itextpdf.sample;
import com.itextpdf.text.Document;
import com.itextpdf.text.Paragraph;
import com.itextpdf.text.pdf.PdfDestination;
import com.itextpdf.text.pdf.PdfOutline;
import com.itextpdf.text.pdf.PdfPTable;
import com.itextpdf.text.pdf.PdfWriter;
import java.io.FileOutputStream;
@behumble
behumble / Support01.java
Last active July 16, 2018 04:20
an iText 5 Outline example to implement two columned target
package com.itextpdf;
import com.itextpdf.text.Document;
import com.itextpdf.text.Paragraph;
import com.itextpdf.text.pdf.PdfDestination;
import com.itextpdf.text.pdf.PdfOutline;
import com.itextpdf.text.pdf.PdfPTable;
import com.itextpdf.text.pdf.PdfWriter;
import java.io.FileOutputStream;

Download Udemy course videos using youtube-dl

$ youtube-dl --list-extractors | grep udemy

Steps

  1. Get link to the course to download. e.g. https://www.udemy.com/course-name/
  2. Login into udemy website, save the cookie from chrome using Chrome (Cookie.txt)[1] export extension. Save it to file udemy-cookies.txt
  3. Get the link of the video that you want to download. usually in format. Use the command provided below where you have to replace the {course_link} and {path_to_cookies_file} with respective paths.

# $ youtube-dl {course_link} --cookies {path_to_cookies_file}

Keybase proof

I hereby claim:

  • I am behumble on github.
  • I am behumble (https://keybase.io/behumble) on keybase.
  • I have a public key whose fingerprint is 382D 1D88 8BB7 458B 0BCC CDDF 0775 028B CE4B EAD5

To claim this, I am signing this object:

@behumble
behumble / json2csv.py
Created March 26, 2015 07:31
flat key,value only (useful for i18n)
#!/usr/bin/env python
import sys
import json
import csv
reload(sys)
sys.setdefaultencoding('utf-8')
if len(sys.argv)<2:
print "json file name please"
@behumble
behumble / log-week.py
Created September 17, 2014 06:17
Displays SVN log by 'accent' from a week ago
#!/usr/bin/env python
import os
from datetime import date
from datetime import timedelta
from subprocess import call
a_week = timedelta(days=7)
a_week_ago = date.today() - a_week
@behumble
behumble / checkdroid-package-names.groovy
Last active August 29, 2015 14:01
duplicated AndroidManifest.xml@package finder
#!/usr/bin/env groovy
String extractPackageName(File manifestFile) {
return new XmlSlurper().parse(manifestFile).@package
}
void listDuplicates() {
for( e in packageToFiles ) {
files = e.value
if(files.size>1) {
@behumble
behumble / ChessBoardDrawable.java
Last active July 7, 2016 11:49
Drawable implementation which draws a chess board to express transparency
package com.thinkfree.touchspan;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.ColorFilter;
import android.graphics.Paint;
import android.graphics.PixelFormat;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;