Skip to content

Instantly share code, notes, and snippets.

View MikeTeddyOmondi's full-sized avatar
🎯
Focusing

Mike Teddy Omondi MikeTeddyOmondi

🎯
Focusing
View GitHub Profile
@MikeTeddyOmondi
MikeTeddyOmondi / arena.h
Last active March 20, 2026 14:23
Tinker with Arena Allocations
/*
* arena.hSingle-header arena allocator (STB-style)
*
* USAGE
* -----
* In exactly ONE .c file, before including this header:
*
* #define ARENA_IMPLEMENTATION
* #include "arena.h"
*
@MikeTeddyOmondi
MikeTeddyOmondi / headscale-acl.hujson
Created February 13, 2026 10:08 — forked from RichardBray/acl.hujson
Access control policy example file for Headscale
{
"acls": [
{"action": "accept", "src": ["*"], "dst": ["*:*"]}
],
"ssh": [
{"action": "accept", "src": ["autogroup:member"], "dst": ["autogroup:member"], "users": ["root"]}
]
}
@MikeTeddyOmondi
MikeTeddyOmondi / headscale-compose.yaml
Last active February 12, 2026 21:39 — forked from RichardBray/docker-compose.yml
Docker file for headscale, headscale-ui and caddy
services:
headscale:
image: docker.io/headscale/headscale:stable
restart: unless-stopped
container_name: headscale
read_only: true
tmpfs:
- /var/run/headscale
ports:
- "27896:8080"
# Source: https://gist.github.com/2dbb2f8683e661eaf0446f10b6974efb
###################################################################
# How To Create Virtual Kubernetes Clusters With vcluster By loft #
# https://youtu.be/JqBjpvp268Y #
###################################################################
# Referenced videos:
# - Multi-Tenant Kubernetes Cluster With Capsule: https://youtu.be/H8bzEJN7fj8
# ===========================================
# ZSH Hacks - Dreams of Code
# ===========================================
# Add these to your .zshrc file
# ===========================================
# -------------------------------------------
# 1. Edit Command Buffer
# -------------------------------------------
# Open the current command in your $EDITOR (e.g., neovim)
@MikeTeddyOmondi
MikeTeddyOmondi / .traefik-cloudflare-tunnel
Created September 12, 2025 10:07 — forked from mattdy/.traefik-cloudflare-tunnel
Traefik on Docker Swarm accessed via Cloudflare Tunnel
Please see https://mattdyson.org/blog/2024/02/using-traefik-with-cloudflare-tunnels for a detailed write-up of this configuration
import { Client } from "@upstash/qstash"
import { NextRequest } from "next/server"
const baseUrl = process.env.NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL
? `https://${process.env.NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL}`
: "http://localhost:3000"
interface Step<I> {
create: <O>(action: (prevResult: Awaited<I>) => O) => Step<O>
finally: (action: (prevResult: Awaited<I>) => any) => any

External Ceph Cluster for Kubernetes

Create an external Ceph Cluster for all your Kubernetes clusters.

INSTALL CEPHADM

  • Prerequisites:
    • 3 VMs, with unused disks
  • Python 3, Cephadm is a Python-based utility
@MikeTeddyOmondi
MikeTeddyOmondi / sync-engine.html
Last active April 26, 2025 14:10
Sync engine - JavaScript
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Sync Engine [JavaScript]</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
}
@MikeTeddyOmondi
MikeTeddyOmondi / eigen-mcp.ts
Created April 18, 2025 18:30 — forked from dabit3/eigen-mcp.ts
EigenLayer MCP Server Example
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { z } from "zod";
import 'dotenv/config'
const server = new McpServer({
name: "EigenLayer AVS service",
version: "1.0.0",
});