Skip to content

Instantly share code, notes, and snippets.

@chonamdoo
chonamdoo / llm-wiki.md
Created April 9, 2026 14:48 — 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.

@chonamdoo
chonamdoo / YouTubeHelper.java
Created March 22, 2018 04:45 — forked from jvanderwee/YouTubeHelper.java
Extract video id from YouTube url in java
import com.google.inject.Singleton;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@Singleton
public class YouTubeHelper {
final String youTubeUrlRegEx = "^(https?)?(://)?(www.)?(m.)?((youtube.com)|(youtu.be))/";
final String[] videoIdRegex = { "\\?vi?=([^&]*)","watch\\?.*v=([^&]*)", "(?:embed|vi?)/([^/?]*)", "^([A-Za-z0-9\\-]*)"};
class BottomNavigationBehavior<V : View>(context: Context, attrs: AttributeSet) :
CoordinatorLayout.Behavior<V>(context, attrs) {
override fun layoutDependsOn(parent: CoordinatorLayout?, child: V, dependency: View?): Boolean {
if (dependency is Snackbar.SnackbarLayout) {
updateSnackbar(child, dependency)
}
return super.layoutDependsOn(parent, child, dependency)
}
@chonamdoo
chonamdoo / Preferences.kt
Created August 24, 2017 06:38 — forked from wispborne/Preferences.kt
Android SharedPreferences helper class for Kotlin. Easy-to-use delegated properties, automatic database creation, and listening for property changes.
import android.content.Context
import android.content.SharedPreferences
import kotlin.reflect.KProperty
/**
* Represents a single [SharedPreferences] file.
*
* Usage:
*
@chonamdoo
chonamdoo / AccountAuthenticator.java
Created June 25, 2017 07:33 — forked from burgalon/AccountAuthenticator.java
Implementing OAuth2 with AccountManager, Retrofit and Dagger
public class AccountAuthenticator extends AbstractAccountAuthenticator {
private final Context context;
@Inject @ClientId String clientId;
@Inject @ClientSecret String clientSecret;
@Inject ApiService apiService;
public AccountAuthenticator(Context context) {
super(context);
@chonamdoo
chonamdoo / isNotificationEnabled.java
Created May 23, 2017 01:56 — forked from pbakondy/isNotificationEnabled.java
Cordova - Push Notifications - Android - How to check notifications are disabled for the application?
// Cordova - Push Notifications - Android
// How to check notifications are disabled for the application?
// Works on Andoid 4.4+ (KitKat)
// Otherwise returns 'true'
// original:
// http://stackoverflow.com/questions/11649151/
public class NotificationsUtils {
package com.novonetworks.eng.core.util;
/*
* Created by orange on 2016-12-29.
*/
import android.util.Log;
import com.crashlytics.android.Crashlytics;
@chonamdoo
chonamdoo / permissions.txt
Created October 10, 2016 09:18 — forked from Arinerron/permissions.txt
A list of all Android permissions...
android.permission.ACCESS_ALL_DOWNLOADS
android.permission.ACCESS_BLUETOOTH_SHARE
android.permission.ACCESS_CACHE_FILESYSTEM
android.permission.ACCESS_CHECKIN_PROPERTIES
android.permission.ACCESS_CONTENT_PROVIDERS_EXTERNALLY
android.permission.ACCESS_DOWNLOAD_MANAGER
android.permission.ACCESS_DOWNLOAD_MANAGER_ADVANCED
android.permission.ACCESS_DRM_CERTIFICATES
android.permission.ACCESS_EPHEMERAL_APPS
android.permission.ACCESS_FM_RADIO
@chonamdoo
chonamdoo / keep_adb.sh
Created September 30, 2016 03:16 — forked from drcarter/keep_adb.sh
adb 연결이 끊기는거 방지 script.
#!/bin/bash
function monitor_adb () {
adb start-server
echo "[$(date)] adb started"
while [ "$(adb shell echo 1)" ]; do sleep 5; done
echo "[$(date)] adb is broken, restarting"
@chonamdoo
chonamdoo / FlymeUtils.java
Created May 30, 2016 05:08 — forked from joinAero/FlymeUtils.java
Android - Helper for 3rd party roms: Flyme & MIUI.
package cc.cubone.turbo.core.rom;
import android.os.Build;
import android.view.Window;
import android.view.WindowManager;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
/**