Skip to content

Instantly share code, notes, and snippets.

@kelledge
kelledge / docker-compose.yml
Last active January 29, 2026 14:22
Local MCP Search
services:
searxng:
container_name: searxng
image: docker.io/searxng/searxng:latest
restart: unless-stopped
ports:
- "8080:8080"
volumes:
- ./searxng-settings.yml:/etc/searxng/settings.yml:ro
environment:
@kelledge
kelledge / Dockerfile
Last active July 15, 2024 19:27
Ubuntu 22.04 and Ruby 2.7.8
FROM ubuntu:22.04 AS dev
RUN apt-get update && apt-get install -y \
gnupg \
wget \
curl
# 1. RVM does not support /bin/sh -- it requires bash or other friends (e.g. zsh)
# 2. Docker's `RUN` command only uses /bin/sh
# 3. Ubuntu 22.04 only has openssl 3.x available in the package repositories
@kelledge
kelledge / gpio_example.sh
Created March 13, 2019 13:59
Simple SysFS GPIO Example
#!/bin/bash
V_POS="20"
V_NEG="21"
gpio_path() {
local pin="${1}"
echo "/sys/class/gpio/gpio${pin}"
}
@kelledge
kelledge / aws_snippets.md
Created August 22, 2017 16:21
AWS Snippets

Security groups for a particular instance:

aws ec2 describe-instances --instance-id="${INSTANCE_ID}" \
  --query 'Reservations[*].Instances[*].SecurityGroups[*].GroupId' --output=text | \
  xargs aws ec2 describe-security-groups --group-ids
@kelledge
kelledge / timeout_defer.py
Created August 5, 2016 21:53
Twisted defers with timeouts
"""
Defers with timeouts. Use `trail` to run the included tests.
"""
from twisted.internet import defer, reactor, task
from twisted.python import failure
from twisted.trial import unittest
class TimeoutDeferredError(Exception):
pass