Skip to content

Instantly share code, notes, and snippets.

View bluelovers's full-sized avatar

bluelovers bluelovers

View GitHub Profile
@bluelovers
bluelovers / llm-wiki.md
Created May 13, 2026 20:00 — 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.

@bluelovers
bluelovers / global-package-replace.ps1
Created March 15, 2026 05:52
用於替換全域安裝的套件 (先移除 pnpm 全域套件,再使用 npm 安裝)
# global-package-replace.ps1
# 用於替換全域安裝的套件 (先移除 pnpm 全域套件,再使用 npm 安裝)
# Usage: .\global-package-replace.ps1 <package-name> [package-name2] [package-name3] ...
# Example: .\global-package-replace.ps1 @types/node @types/jest
param(
[Parameter(Mandatory=$true, ValueFromRemainingArguments=$true)]
[string[]]$PackageNames
)
const os = require('os');
const fs = require('fs');
const crypto = require('crypto');
const { exec } = require("child_process");
// ANSI escape codes for colors
const colors = {
reset: "\x1b[0m",
blue: "\x1b[34m",
yellow: "\x1b[33m",
@bluelovers
bluelovers / lazy-wildcards.yaml
Last active May 20, 2024 20:06
lazy wildcards file for create lora dataset
#
# https://github.com/adieyal/sd-dynamic-prompts/blob/main/docs/SYNTAX.md
#
# https://civitai.com/user/C0rn_Fl4k3s/models
# https://civitai.com/models/138970/billions-of-wildcards-character-vehicle-scenery-building-creature-scifi-fantasy-magic-all-you-want
# https://github.com/sdbds/stable-diffusion-webui-wildcards
#
lazy-wildcards:
prompts:
showcase:
@bluelovers
bluelovers / ChatGPT Stable Diffusion prompts generator.txt
Last active May 20, 2026 16:47
using ChatGPT as Stable Diffusion prompts generator
Stable Diffusion is an AI art generation model similar to DALLE-2.
Here are some prompts for generating art with Stable Diffusion.
Example:
- A ghostly apparition drifting through a haunted mansion's grand ballroom, illuminated by flickering candlelight. Eerie, ethereal, moody lighting.
- portait of a homer simpson archer shooting arrow at forest monster, front game card, drark, marvel comics, dark, smooth
- pirate, deep focus, fantasy, matte, sharp focus
- red dead redemption 2, cinematic view, epic sky, detailed, low angle, high detail, warm lighting, volumetric, godrays, vivid, beautiful
- a fantasy style portrait painting of rachel lane / alison brie hybrid in the style of francois boucher oil painting, rpg portrait
--- Actions ---
$Copy <M-C>
$Cut <M-X> <S-Del>
$Delete <Del> <BS> <M-BS>
$LRU
$Paste <M-V>
$Redo <M-S-Z> <A-S-BS>
$SearchWeb
$SelectAll <M-A>
$Undo <M-Z>
@bluelovers
bluelovers / README.md
Created December 24, 2019 15:30
metro-config 0.56 windows fix

metro-config 0.56 windows fix

@bluelovers
bluelovers / index.ts
Created May 25, 2019 04:08
createPotplayerList
/**
* Created by user on 2019/5/25.
*/
import { globbyASync, IOptionsWithReturnGlobList, getOptions } from 'node-novel-globby/g';
import Bluebird = require('bluebird');
import { sortTree } from 'node-novel-globby/lib/glob-sort';
import path = require('path');
import fs = require('fs-extra');
@bluelovers
bluelovers / package-json.d.ts
Created May 17, 2019 15:48 — forked from iainjreid/package-json.d.ts
A Typescript type definition for NPM package files
export interface IPackageJSON extends Object {
readonly name: string;
readonly version?: string;
readonly description?: string;
readonly keywords?: string[];
@bluelovers
bluelovers / opds.xml
Last active March 7, 2019 21:02
opds test
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/terms/" xmlns:opds="http://opds-spec.org/2010/catalog">
<title>My Catalog</title>
<updated>2019-03-07T21:01:37.772Z</updated>
<author>
<name>Samy Pesse</name>
<uri>https://www.gitbook.com</uri>
</author>
<entry>
<title>A book</title>