Skip to content

Instantly share code, notes, and snippets.

View erlingur's full-sized avatar

Erlingur Þorsteinsson erlingur

View GitHub Profile
@erlingur
erlingur / kamal-production-server-setup.sh
Created October 1, 2025 14:34 — forked from rameerez/kamal-production-server-setup.sh
Set up a Ubuntu server to deploy Kamal 2.x Docker containers to, hardened security and production ready
#!/bin/bash
# Production Docker Host Hardening Script v2
# For Ubuntu Server 24.04 LTS (Noble)
# Suitable for both Kamal deployment and builder hosts
set -euo pipefail
IFS=$'\n\t'
# --- Constants ---
require 'action_dispatch/http/mime_type'
require 'action_view'
require 'active_support'
require 'writeexcel'
class WriteExcelTemplateHandler
def self.call(template)
%{
tmp = Tempfile.new('writeexcel')
workbook = WriteExcel.new(tmp.path)