Skip to content

Instantly share code, notes, and snippets.

View MatthewDaniels's full-sized avatar

Matthew Daniels MatthewDaniels

  • Brisbane, Qld, Australia
View GitHub Profile
@MatthewDaniels
MatthewDaniels / RFC3339_PolyFill.js
Last active September 21, 2021 05:44
Polyifill the JS Date object to have a strict RFC 3339 string method
if (!Date.prototype.toRFC3339String) {
(function () {
function pad(number) {
if (number < 10) {
return '0' + number;
}
return number;
}
@MatthewDaniels
MatthewDaniels / composer-command.sh
Created September 16, 2022 23:05
Use this script to quickly and easily run composer commands without the need for it being installed on the host machine.
#!/bin/bash
# use this to run composer commands in a container (rather than on the host machine)
# to execute:
# ./composer-command.sh {{ composer commands }}
# the {{ composer commands }} above get passed to composer for execution (eg: "install")
#
# ./composer-command.sh install --dev
#
# Install Laravel (run this from a parent directory)
#!/bin/bash
aws route53 list-hosted-zones | jq -c '.HostedZones | .[]' | while read i; do
name=$(echo $i | jq -r .Name)
id=$(echo $i | jq -r .Id)
aws route53 list-resource-record-sets --hosted-zone-id "${id}" | jq -r '.ResourceRecordSets[] | [.Name, .Type, (.ResourceRecords[]? | .Value), .AliasTarget.DNSName?] | @csv' > "${name//./_}DNS_Zone.csv"
done