Skip to content

Instantly share code, notes, and snippets.

@hallettj
hallettj / global-variables-are-bad.js
Created February 14, 2009 21:15
How and why to avoid global variables in JavaScript
// It is important to declare your variables.
(function() {
var foo = 'Hello, world!';
print(foo); //=> Hello, world!
})();
// Because if you don't, the become global variables.
(function() {
@whitequark
whitequark / installsword.c
Last active August 7, 2026 04:54
installsword.exe "My Installer Title" "Cool Title in the Background"
#define WIN32_LEAN_AND_MEAN
#include <tchar.h>
#include <stdint.h>
#include <windows.h>
#include <shellapi.h>
COLORREF rgbText = 0xffffff;
LPTSTR pchFontName = _T("Times New Roman");
INT iFontSizePt = 24;
LPTSTR pchText = _T("InstallSword Wizard");

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.

@thothagent
thothagent / vps-hermes-setup-guide.md
Created May 20, 2026 16:09
How to run Hermes Agent 24/7 on a VPS — Steven's Setup Guide

How to Run Hermes Agent 24/7 on a VPS — Steven's Setup Guide

This guide is for anyone who wants to run Hermes Agent always-on without keeping their personal computer on. It's written for beginners — you don't need to know Linux or sysadmin work to get this working.

What Is Hermes Agent?

Hermes is an open-source AI agent from Nous Research. It runs on a server (or VPS), connects to your messaging apps (Telegram, Discord, etc.), and can execute tasks, browse the web, manage files, and more — 24 hours a day, 7 days a week.

The heavy AI processing happens via external API (OpenRouter, OpenAI, etc.) — the VPS just runs the coordinator.

Design Thinking

X → Graph → Effect<A, E, R>
│              │   │  │  │
│              │   │  │  └─ what each node needs     (§5)
│              │   │  └──── where the graph breaks   (§4)
│              │   └─────── what flows through nodes  (§2)
│              │
│ └─ nodes = functions, edges = data flow
@vasanthk
vasanthk / System Design.md
Last active August 7, 2026 03:35
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?