Skip to content

Instantly share code, notes, and snippets.

View makkes's full-sized avatar
🤓
My voice is my passport. Verify me!

Max Jonas Werner makkes

🤓
My voice is my passport. Verify me!
View GitHub Profile
@makkes
makkes / grafana-dashboard-k8s-provisioning.md
Created October 28, 2024 09:37
Grafana Dashboard as ConfigMaps
  1. Navigate to the dashboard in Grafana
  2. Click blue "Share" button at the top
  3. Select the "Export" tab
  4. Click on "View JSON"
  5. Click "Copy to Clipboard"
  6. Create a new file in your repository and copy the following snippet into it:
apiVersion: v1
kind: ConfigMap
@makkes
makkes / release.yaml
Created April 28, 2025 07:14
Go binary building with Azure Trusted Signing and SLSA provenance generation
name: release
on:
push:
tags:
- "*"
workflow_dispatch:
inputs:
tag:
description: "release tag"
required: true
@makkes
makkes / rag_llamaindex.py
Created October 16, 2025 13:57
LlamaIndex
from llama_index.core import SimpleDirectoryReader, VectorStoreIndex, Settings, StorageContext, load_index_from_storage
from llama_index.embeddings.ollama import OllamaEmbedding
from llama_index.llms.ollama import Ollama
from llama_index.vector_stores.chroma import ChromaVectorStore
import chromadb, os
DOC_DIR = "docs"
PERSIST_DIR = ".li_storage"
Settings.embed_model = OllamaEmbedding(model_name="nomic-embed-text") # local
#!/usr/bin/env python3
import http.server as SimpleHTTPServer
import socketserver as SocketServer
PORT = 8000
class GetHandler(
SimpleHTTPServer.SimpleHTTPRequestHandler
):