Skip to content

Instantly share code, notes, and snippets.

View axelquack's full-sized avatar

Axel Quack axelquack

View GitHub Profile
@axelquack
axelquack / liteLlmProxyWithPostgresqlBackend.md
Last active April 22, 2025 20:37
This Gist provides a Docker Compose setup tailored for running the LiteLLM on a ZimaOS host system. It utilizes a PostgreSQL database for persistent storage of keys, usage data, and configurations, managed via Dockge.

LiteLLM proxy with PostgreSQL backend

This Gist provides a Docker Compose setup tailored for running the LiteLLM Proxy on a ZimaOS host system. It utilizes a PostgreSQL database for persistent storage of keys, usage data, and configurations, managed via Dockge

Host System Context:

  • Operating System: ZimaOS (an immutable Linux system built with Buildroot) - although this should work on any other Linux OS.
  • Path Convention: ZimaOS commonly uses /DATA/AppData/ for persistent application data.
  • Orchestration: While this setup is managed using Dockge, the instructions primarily use standard docker compose terminal commands for clarity and wider applicability. Dockge users can adapt these steps using the Dockge UI (e.g., editing compose files, setting environment variables, deploying stacks).

RAG refinement

Current approach: RAG with Open WebUI

RAG is a technique that enhances large language models (LLMs) by retrieving relevant information from a document base to improve response accuracy.

Based on the Open WebUI RAG Tutorial (Open WebUI RAG Tutorial), my current approach to Retrieval-Augmented Generation (RAG) leverages Open WebUI’s built-in knowledge base feature to enhance LLM responses with context from my NAS files (Markdown, PDF, and ePub).

Documents are uploaded to a named knowledge base (e.g., “NAS Documents”) in Open WebUI, processed into chunks, and stored in a vector database (the default Chroma). Using a custom model configured with this knowledge base, queries prefixed with # (e.g., #NAS Documents How do I configure Docker?) retrieve relevant document chunks via Chroma, which Ollama’s LLM (e.g., deepseek-r1:14b) uses to generate accurate, context-aware responses.

@axelquack
axelquack / mcpSseStdioComparison.md
Created April 10, 2025 04:33
MCP transport mechanisms: SSE and stdio

MCP transport mechanisms: SSE and stdio

The Model Context Protocol (MCP) is a standard for AI agents to interact with tools and resources, and it supports two main transport mechanisms: Server-Sent Events (SSE) and Standard Input/Output (stdio). This article will explain the differences between MCP servers using SSE and stdio, especially in the context of client tools that demand OpenAPI endpoints, which are web-accessible APIs defined by the OpenAPI specification.

The analysis is grounded in recent documentation and community discussions, reflecting the state of MCP as of April 9, 2025.

What Are SSE and Stdio in MCP?

  • SSE (Server-Sent Events): Are a web-based method that allows real-time, one-way communication from the server to the client over HTTP. It is great for remote access and web-based clients, as it can push updates as they happen.
  • Stdio (Standard Input/Output): Is a local method for communication between processes on the same system. It’s
@axelquack
axelquack / settingUpHomepageWithDockerAutoDiscoveryForZotero.md
Created April 7, 2025 06:42
Setting Up Homepage with Docker Auto-Discovery for Zotero

Setting Up Homepage with Docker Auto-Discovery for Zotero

This guide outlines the steps to configure Homepage with auto-discovery for a Zotero Docker container. The tecnativa/docker-socket-proxy is utilized to securely access the Docker API, enabling Homepage to detect and display the Zotero container based on its labels.

Prerequisites

  • Docker and Docker Compose are installed on the system.
  • A Zotero instance is operational within a Docker container.
  • Familiarity with Docker networks and volumes is assumed.
@axelquack
axelquack / generateAndInstallSslCertificatesForUnifiUdmProWithLocalCa.md
Last active April 5, 2025 07:14
Generate and Install SSL Certificates for UniFi UDM Pro with Local CA

Generate and Install SSL Certificates for UniFi UDM Pro with Local CA

Network Setup

  • Gateway: Dream Machine Pro (Unifi) * IP: 10.0.0.1 (fixed) * DNS Entry: gateway.example.net
  • Network Name: example.net * Subnet: 10.0.0.0/24 (configured under Settings > Networks)
  • Client Machine (example): Named "client1"
@axelquack
axelquack / automountSmbUnderBazzite.md
Last active April 2, 2025 15:27
Automount SMB under Bazzite by using systemd

Automount SMB under Bazzite

Make sure that you replace whatever is in "<>" with your own data.

Setup authentication configuration file

Generate a file that defines the login data to mount the volume. The file will be called credentials located at /var/home/<username>/.smb/credentials. Make sure you first generate the folder mkdir /var/home/<username>/.smb.

username=<username>

Igir Collection Manager

Igir is a zero-setup ROM collection manager that sorts, filters, extracts or archives, patches, and reports on collections of any size on any OS. It can be used to rename your ROMs to match the RomM database, and to move them into a new directory structure.

Setup

Directory structure

The directory structure is important for running the bulk ROM renaming script. Before running the bulk ROM renaming script, set up your directories as follows: