This file contains hidden or 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
| <?php | |
| //GET XML data from RCS NexGen | |
| //?nexgendata=ENCODEDXML | |
| // The raw XML data sent from NexGen | |
| $xml_raw = $_GET['nexgendata']; | |
| // A simple way to convert the XML to an associative array | |
| $xml_nexgen = json_decode(json_encode((array)simplexml_load_string($xml_raw)), 1); |
This file contains hidden or 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
| <?php | |
| // Trello Time Tracker | |
| // (C) 2017 Anthony Eden | |
| // http://mediarealm.com.au/ | |
| // This script takes an JSON export from a Trello board (saved as data.json) and shows you a timesheet | |
| // It uses Custom Fields in Trello to read the hours spent working on each card, then displays it as a table | |
| // Simple, yet very handy. |
This file contains hidden or 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
| <?php | |
| function AWS_S3_PresignDownload($AWSAccessKeyId, $AWSSecretAccessKey, $BucketName, $AWSRegion, $canonical_uri, $expires = 8400) { | |
| // Creates a signed download link for an AWS S3 file | |
| // Based on https://gist.github.com/kelvinmo/d78be66c4f36415a6b80 | |
| $encoded_uri = str_replace('%2F', '/', rawurlencode($canonical_uri)); | |
| // Specify the hostname for the S3 endpoint | |
| if($AWSRegion == 'us-east-1') { |
This file contains hidden or 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
| # A sample script to create a temporary copy of a Paradox database, connect to it, and query it. | |
| # Requires PyPyODBC: https://pypi.python.org/pypi/pypyodbc | |
| # Written by Anthony Eden - http://mediarealm.com.au/ | |
| import os | |
| import shutil | |
| import pypyodbc |
This file contains hidden or 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
| """ | |
| Zetta Status Feed - Example Code | |
| Written by Anthony Eden (http://mediarealm.com.au/) | |
| https://mediarealm.com.au/articles/rcs-zetta-status-feed-getting-started/ | |
| """ | |
| # We need the PySimpleSoap library (https://pypi.python.org/pypi/PySimpleSOAP/1.16) | |
| # Make sure you see my change to PySimpleSoap in the file "pysimplesoap-helpers-patch.py" | |
| from pysimplesoap.client import SoapClient |
This file contains hidden or 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 | |
| # This script downloads your Icecast XML script from AWS S3, compares it for changes, and reloads Icecast if changes have been found | |
| # Written by Anthony Eden (http://mediarealm.com.au/) | |
| file="icecast.xml" | |
| bucket="BUCKET-NAME-GOES-HERE" | |
| s3Key="KEY-GOES-HERE" | |
| s3Secret="SECRET-GOES-HERE" |
This file contains hidden or 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
| """ | |
| Zetta Log Import Emailer | |
| This script will email you whenever a new log is imported into Zetta | |
| Written by Anthony Eden (https://mediarealm.com.au/) | |
| """ | |
| # You need to download this module: https://pypi.python.org/pypi/pypyodbc | |
| # Email config options |
This file contains hidden or 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
| <?php | |
| function wp_date_localised($format, $timestamp = null) { | |
| // This function behaves a bit like PHP's Date() function, but taking into account the Wordpress site's timezone | |
| // CAUTION: It will throw an exception when it receives invalid input - please catch it accordingly | |
| // From https://mediarealm.com.au/ | |
| $tz_string = get_option('timezone_string'); | |
| $tz_offset = get_option('gmt_offset', 0); | |
This file contains hidden or 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
| "C:\Program Files\Lets Encrypt\letsencrypt.exe" --renew --baseuri "https://acme-v01.api.letsencrypt.org/" | |
| powershell -File "C:\Program Files\Lets Encrypt\RDS_INSTALL_CERT.ps1" -CertificateImport "C:\ProgramData\letsencrypt-win-simple\httpsacme-v01.api.letsencrypt.org\remote.example.com-all.pfx" -RDCB remote.example.com |
This file contains hidden or 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
| # Run this as a Computer Startup script to allow installing fonts from C:\InstallFont\ | |
| # Based on http://www.edugeek.net/forums/windows-7/123187-installation-fonts-without-admin-rights-2.html | |
| # Run this as a Computer Startup Script in Group Policy | |
| # Full details on my website - https://mediarealm.com.au/articles/windows-font-install-no-password-powershell/ | |
| $SourceDir = "C:\InstallFont\" | |
| $Source = "C:\InstallFont\*" | |
| $Destination = (New-Object -ComObject Shell.Application).Namespace(0x14) | |
| $TempFolder = "C:\Windows\Temp\Fonts" |