This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this function takes an array (or MD array) and returns properly formatted XML without numeric element names. | |
// based on array_to_xml from https://stackoverflow.com/questions/1397036/how-to-convert-array-to-simplexml | |
function array_to_xml( $data, &$xml_data, $element = "") { | |
foreach( $data as $key => $value ) { | |
if(! is_numeric($key) ){ | |
$element = $key; | |
//print $element . "<br>"; | |
} else { | |
$element = rtrim($element,'s'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
function usage { | |
programName=$0 | |
echo "description: use this program to send an email using the SendGrid API" | |
echo "usage: $programName [-p \"to phone\"] [-m \"message\"]" | |
echo " -p The recipient phone" | |
echo " -m The message" | |
exit 1 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script Description: this script backs up the database defined in $DB_NAME to $DB_PATH and offloads the product to S3 | |
# Requirements: Amazon S3 account & credentials, s3 command line tools, mysql credentials, loggly account, call fire account | |
# Note: This script reveals tokens and credentials for mysql, amazon, loggly and callfire. | |
# Run: via cron or ./ | |
# Rob Watts | |
# Version 1.1 | |
# Modified: July 11th 2018 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
function usage { | |
programName=$0 | |
echo "description: A simple shell script to send PushBullet notices" | |
echo "usage: $programName [-t \"type\"] [-s \"subject\"] [-m \"messagel\"]" | |
echo " -t The type (note, file or link) this script only supports 'note'" | |
echo " -s The subject" | |
echo " -m The message" | |
exit 1 |