Skip to content

Instantly share code, notes, and snippets.

View johnkellar's full-sized avatar

John Kellar johnkellar

View GitHub Profile
@johnkellar
johnkellar / deploy-ec2.sh
Last active March 23, 2026 19:06
LeanTo EC2 deploy script
#!/usr/bin/env bash
# LeanTo EC2 Deployment Script
# Run this ON the EC2 instance. It installs Docker, configures LeanTo,
# sets up Caddy for HTTPS, and starts everything.
#
# Usage:
# ./deploy/deploy-ec2.sh # Interactive — prompts for values
# ./deploy/deploy-ec2.sh --env .env # Reads values from an env file
#
# Requirements: Amazon Linux 2023, Ubuntu 22+, or Debian 12+ (fresh instance)
@johnkellar
johnkellar / rabbit.rake
Last active January 29, 2019 20:22
RabbitMQ Configuration Rake Tasks
namespace :rabbit do
def get_queues
`#{@base_command} list queues | awk '{print$4}' | grep -vw '|' | grep -vw 'name' | awk 'NF'`
end
def get_queues_with_count
`#{@base_command} list queues | awk '{print$18, $4}' | grep -vw '|' | grep -vw 'name' | awk 'NF'`
end