Skip to content

Instantly share code, notes, and snippets.

View ChrisHardie's full-sized avatar

Chris Hardie ChrisHardie

View GitHub Profile
@m-radzikowski
m-radzikowski / script-template.sh
Last active May 22, 2025 17:41
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@tony722
tony722 / sendmail-gcloud
Last active July 8, 2025 04:07
Freepbx Voicemail Transcription Script: Google Speech API
#!/bin/sh
#set -x # Enable shell debugging
#exec 2> /tmp/sendmail-gcloud-debug.log # Redirect stderr to a custom log
# sendmail-gcloud
#
# Installation instructions - Updated for FreePBX 17 and Debian
# Copy the content of this file to /usr/sbin/sendmail-gcloud
#
# Google Account