Skip to content

Instantly share code, notes, and snippets.

@reyjrar
reyjrar / elasticsearch.yml
Last active December 26, 2024 21:46
ElasticSearch config for a write-heavy cluster
##################################################################
# /etc/elasticsearch/elasticsearch.yml
#
# Base configuration for a write heavy cluster
#
# Cluster / Node Basics
cluster.name: logng
# Node can have abritrary attributes we can use for routing
@touilleMan
touilleMan / SimpleHTTPServerWithUpload.py
Last active August 4, 2026 10:19 — forked from UniIsland/SimpleHTTPServerWithUpload.py
Simple Python Http Server with Upload - Python3 version
#!/usr/bin/env python3
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
see: https://gist.github.com/UniIsland/3346170
"""
@stdrc
stdrc / gist:ab006e9dfe64a613522b
Last active November 24, 2022 09:47
将 NSString 字符串转换成 Unicode 编码(形如 \u597d)
+ (NSString *)unicodeStringWithString:(NSString *)string {
NSString *result = [NSString string];
for (int i = 0; i < [string length]; i++) {
result = [result stringByAppendingFormat:@"\\u%04x", [string characterAtIndex:i]];
/*
因为 Unicode 用 16 个二进制位(即 4 个十六进制位)表示字符,对于小于 0x1000 字符要用 0 填充空位,
所以使用 %04x 这个转换符, 使得输出的十六进制占 4 位并用 0 来填充开头的空位.
*/
}
return result;
@qti3e
qti3e / README.md
Last active September 13, 2026 06:13
List of file signatures and mime types based on file extensions
@StephenNneji
StephenNneji / demo_view.py
Last active November 1, 2023 01:55
Add checkbox in QTableView Header using icons
import numpy
from PyQt5 import QtCore, QtWidgets, QtGui
Qt = QtCore.Qt
class NumpyModel(QtCore.QAbstractTableModel):
def __init__(self, narray, parent=None):
QtCore.QAbstractTableModel.__init__(self, parent)
self._array = narray.point
self.test = narray.enabled
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active September 30, 2026 06:30
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized
@YuriyGuts
YuriyGuts / link-ollama-models-to-lm-studio.py
Last active September 1, 2026 16:46
Expose Ollama models to LM Studio by symlinking its model files. Just run `python3 link-ollama-models-to-lm-studio.py`. On Windows, run it as admin.

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.