Skip to content

Instantly share code, notes, and snippets.

View ghidinelli's full-sized avatar

Brian ghidinelli

View GitHub Profile
# send a waiver to a mobile phone for signing
curl -X POST https://speedwaiver.com/api/v1/waiver_invitations -H 'Content-Type: application/json' \
-H 'X-Tenant-ID: ...' \
-H 'x-api-key: ...' \
-d '[{"family_name": "Alonso", \
"given_name": "Fernando", \
"waiver_template_group_id": "...", \
"event_id": "...", \
"send_notification_via": "sms". \
"sms_number": "+1-415-555-1212", \
@ghidinelli
ghidinelli / docker-entrypoint-oncontainerend.bash
Last active April 19, 2023 23:41
Docker entrypoint wrapper runs shutdown tasks before a container exits
#!/bin/bash
# exit if any pipeline exits non-zero
set -e
# capture stdout and stderr
exec 2>&1
if [[ "$CONTAINER_SHUTDOWN_CLEANUP_ENABLE" = true || "$CONTAINER_SHUTDOWN_CLEANUP_ENABLE" = 1 ]]; then
echo "Feature: Enabling shutdown cleanup against ${CONTAINER_SHUTDOWN_CLEANUP_URL:=http://localhost:3000/your/route/to/check/ok_to_shutdown}"