Skip to content

Instantly share code, notes, and snippets.

View mvandermeulen's full-sized avatar

Mark mvandermeulen

  • Fivenynes
  • Sydney, Australia
  • 17:15 (UTC +10:00)
View GitHub Profile
name description
Direct Dev
Concise, critical, no-nonsense responses for software development

You are Claude Code with a direct, development-focused communication style.

Core Communication Rules

Be Direct: Cut straight to the point. No preambles, pleasantries, or buffer language.

@mvandermeulen
mvandermeulen / zsh-strings.md
Created August 23, 2025 23:17 — forked from mattmc3/zsh-strings.md
Zsh - string utilities

zsh strings

Fish has a utility for [string maniplulation][string].

This is how you can do the same things with Zsh builtins.

References:

  • [Zsh regex][3]
  • [String modifiers][1]
  • [String expansion][2]
@mvandermeulen
mvandermeulen / async-redis-cache.py
Created August 17, 2025 03:28 — forked from cmin764/async-redis-cache.py
Async Redis caching (with cluster mode support)
import os
from redis.asyncio import Redis, RedisCluster
from servicelib.logging import get_our_logger
logger = get_our_logger(__name__)
class RedisCache:
@mvandermeulen
mvandermeulen / decorators_aioredis_class.py
Created August 17, 2025 03:28 — forked from grahama1970/decorators_aioredis_class.py
Added a Different Redis implementation to LiteLLM
from types import SimpleNamespace
import litellm
from litellm.integrations.custom_logger import CustomLogger
from litellm import completion, acompletion
import asyncio
from functools import wraps
from tenacity import retry, retry_if_exception_type, stop_after_attempt, wait_exponential
from litellm import RateLimitError, APIError
import os
from dotenv import load_dotenv
@mvandermeulen
mvandermeulen / rpc.py
Created August 17, 2025 03:27 — forked from teaishealthy/rpc.py
teaRPC - portable Redis* RPC
import asyncio
import json
import traceback
import uuid
from typing import (
Any,
Awaitable,
Callable,
Coroutine,
Literal,
@mvandermeulen
mvandermeulen / typedredis.py
Created August 17, 2025 03:26 — forked from Graeme22/typedredis.py
Fix redis-py's terrible types and add serialization
import pickle
from typing import Any, Set, Type, TypeVar
from redis.asyncio import Redis
from redis.typing import AbsExpiryT, ExpiryT, KeyT, ResponseT
T = TypeVar("T")
class TypedRedis(Redis):
@mvandermeulen
mvandermeulen / repr.py
Created August 17, 2025 03:19 — forked from htv2012/repr.py
Create a __repr__ for a class
#!/usr/bin/env python3
"""
Generate the repr for a class
"""
import argparse
import io
import subprocess
import platform
@mvandermeulen
mvandermeulen / clip.py
Created August 17, 2025 03:19 — forked from ur0n2/clip.py
Clipboard copy & paste with python
import sys
import ctypes
OpenClipboard = ctypes.windll.user32.OpenClipboard
EmptyClipboard = ctypes.windll.user32.EmptyClipboard
GetClipboardData = ctypes.windll.user32.GetClipboardData
SetClipboardData = ctypes.windll.user32.SetClipboardData
CloseClipboard = ctypes.windll.user32.CloseClipboard
CF_UNICODETEXT = 13
@mvandermeulen
mvandermeulen / README.md
Created August 17, 2025 03:19 — forked from jldiaz/README.md
Copy/paste into vim registers via ssh tunnel

These scripts allows you to use vim in a remote machine via ssh, and being capable of sharing the local clipboard with vim's 0 register (which is the one used by default by yank/paste).

To make it work:

  1. In your local machine, run clipboard-server.py, which uses flask to create a simple REST API exposing only the / endpoint, listening on localhost:11223

    GET / will retrieve the system clipboard of the machine in which the server is run, in form of a JSON with the field "content".

@mvandermeulen
mvandermeulen / election-manager.py
Created August 17, 2025 03:18 — forked from AdamOlszewskiIT/election-manager.py
Redis - master slave election manager
import time
import threading
import uuid
from fastapi import FastAPI
from redis import Redis
# Configuration
REDIS_HOST = "localhost"
REDIS_PORT = 6379
MASTER_KEY = "master"