Skip to content

Instantly share code, notes, and snippets.

View cosimo's full-sized avatar
🇳🇴

Cosimo Streppone cosimo

🇳🇴
View GitHub Profile
@cosimo
cosimo / summary-amazon-dynamodb-service-disruption-us-east-1-region-2025-10-19.md
Last active October 24, 2025 09:15
Summary of the Amazon DynamoDB Service Disruption in Northern Virginia (US-EAST-1) Region

(originally published at https://aws.amazon.com/message/101925/)

We wanted to provide you with some additional information about the service disruption that occurred in the N. Virginia (us-east-1) Region on October 19 and 20, 2025. While the event started at 11:48 PM PDT on October 19 and ended at 2:20 PM PDT on October 20, there were three distinct periods of impact to customer applications.

First, between 11:48 PM on October 19 and 2:40 AM on October 20, Amazon DynamoDB experienced increased API error rates in the N. Virginia (us-east-1) Region.

Second, between 5:30 AM and 2:09 PM on October 20, Network Load Balancer (NLB) experienced increased connection errors for some load balancers in the N. Virginia (us-east-1) Region. This was caused by health check failures in the NLB fleet, which resulted in increased connection errors on some NLBs.

Third, between 2:25 AM and 10:36 AM on October 20, new EC2 instance launches failed and, while instance launches began to

@cosimo
cosimo / get-couchbase-bucket-manifest-version.sh
Created October 9, 2025 14:41
Get Couchbase bucket manifest version
#!/bin/bash
set -e
BUCKET_NAME="$1"
curl -s --user $CB_USER http://localhost:8091/pools/default/buckets/${BUCKET_NAME}/scopes | jq -r .uid
@cosimo
cosimo / tomcat9.service
Created July 31, 2024 08:41
tomcat9 systemd service unit file
[Unit]
Description=Apache Tomcat 9 Web Application Server
Documentation=https://tomcat.apache.org/tomcat-9.0-doc/index.html
After=network-online.target
Wants=cloud-final.service
[Service]
# Configuration
Environment="CATALINA_HOME=/usr/share/tomcat9"
@cosimo
cosimo / generate-google-pay-keys.py
Created May 29, 2024 12:58
Generate Google Pay private/public keys
"""
Generate private/public keys for use in Google Pay Business Console
https://pay.google.com/business/console/
"""
import base64
from cryptography.hazmat.primitives.asymmetric import ec
from cryptography.hazmat.primitives import serialization
# Generate the ECDSA private key
@cosimo
cosimo / migrate-templates.py
Created May 8, 2024 15:52
Migrate Sendgrid templates between different accounts
"""
Migrates SendGrid templates from one account to another.
Requires a `.env` file with the following variables:
- SOURCE_SENDGRID_API_KEY
- DESTINATION_SENDGRID_API_KEY
There is not much error handling here. This is not a place of honor.
It turned out to run quite smoothly still.
"""
@cosimo
cosimo / Dockerfile
Created May 6, 2024 12:28
Dockerfile to build varnish modules and vmod_dynamic
# Build the dynamic and vsthrottle Varnish modules from source.
FROM ubuntu:20.04
ENV TZ=Etc/UTC
ENV VARNISH_VERSION 7.4
# Avoid tzdata terminal configuration that would halt the build
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
@cosimo
cosimo / Dockerfile
Last active March 25, 2024 15:42
Dockerfile to build libvmod-dynamic 7.4 (https://github.com/nigoroll/libvmod-dynamic)
# Build libvmod_dynamic.so from source (https://github.com/nigoroll/[email protected])
FROM ubuntu:20.04
ENV TZ=Etc/UTC
ENV VARNISH_VERSION 7.4
# Avoid tzdata terminal configuration that would halt the build
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
@cosimo
cosimo / hetzner.vimrc
Last active January 13, 2025 19:55
Hetzner rescue mode /root/.vimrc file
"=======================================================================
" Vim settings file by Andreas Schneider <mail at cynapses.org>
" with parts from Ciaran McCreesh <ciaranm at gentoo.org>
" and Sven Guckes <setup-vimrc.forall at guckes.net>
"
" Most recent update: Do Mär 01 11:35:54 CET 2007
"
" Get the latest version from:
" http://www.cynapses.org/tmp/setup/
"
@cosimo
cosimo / wss.py
Created August 29, 2023 08:44
Python: connect to a websocket and send a message without any asyncio complications
#
# Requirements:
# - websocket-client==1.6.2
#
from websocket import create_connection
def select_origin_header(extra_headers):
origin = None
@cosimo
cosimo / py3-poetry-ci.yml
Created March 30, 2023 15:36
GHA ci workflow for Python 3 projects based on Poetry
name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
ci:
strategy: