Skip to content

Instantly share code, notes, and snippets.

View seanhamlin's full-sized avatar

Sean Hamlin seanhamlin

View GitHub Profile
#!/bin/bash
# Script to Auto Update Plex on Synology NAS
#
# Must be run as root.
#
# @author Martino https://forums.plex.tv/u/Martino
# @see https://forums.plex.tv/t/script-to-auto-update-plex-on-synology-nas-rev4/479748
mkdir -p /tmp/plex/
@seanhamlin
seanhamlin / recv.vcl
Last active January 8, 2025 21:42
Strip analytics (Google, Facebook etc) query parameters in Fastly
# Query string stripping for web analytics and attack query parameters.
#
# Currently stripped query parameteres include:
# - Google Analytics
# - Google Adwords (Doubleclick)
# - Facebook
# - TikTok
# - Wordfence security
#
# @see https://developers.google.com/tag-platform/devguides/consent#added_parameters
@seanhamlin
seanhamlin / .lagoon.yml
Created June 23, 2022 01:53
Static Nginx container
docker-compose-yaml: docker-compose.yml
environments:
production:
routes:
- nginx:
- "www.example.com"
# Use basic filtering of `drush status` to hopefully ensure more broader support
# for various drush versions.
DRUPAL_VERSION=$(drush status | grep -i "drupal version" | awk '{print $NF}');
if [ "${DRUPAL_VERSION%.*}" == "7" ] ; then
if drush cc all; then echo "drush cc all complete"; else exit $?; fi;
elif [ "${DRUPAL_VERSION%.*.*}" -ge "8" ] ; then
if drush cr -y; then echo "drush cache:rebuild complete"; else exit $?; fi;
else \
echo "could not clear cache for found Drupal version ${DRUPAL_VERSION}";
exit 1;
@seanhamlin
seanhamlin / site_au_2025.csv
Created March 11, 2025 20:35
Full raw data from the site crawl
We can't make this file beautiful and searchable because it's too large.
"id","domain","description","pageRank","valid","pageCountEstimate","crawledPages","lastCrawled","cms","cmsVersion"
1,"https://www.stirling.wa.gov.au/","Was stirling.wa.gov.au",4.48,1,0,0,1741664082,"unknown",NULL
2,"https://www.health.gov.au/","Was health.gov.au",5.79,1,0,0,1741290595,"drupal","10"
3,"http://www.bom.gov.au/akamai/https-redirect.html","Was bom.gov.au",5.6,1,0,0,1741664088,"unknown",NULL
4,"https://www.abs.gov.au/","Was abs.gov.au",5.55,1,0,0,1741290614,"drupal","10"
5,"https://www.ato.gov.au/","Was ato.gov.au",5.52,1,0,0,1741585744,"sitecore",NULL
6,"https://www.qld.gov.au/","Was qld.gov.au",5.41,1,0,0,1741290641,"squiz-matrix",""
7,"https://www.nsw.gov.au/","Was nsw.gov.au",5.34,1,0,0,1741290655,"drupal",""
8,"https://www.aph.gov.au/","Was aph.gov.au",5.31,1,0,0,1741290671,"sitecore",""
9,"https://www.legislation.gov.au/","Was legislation.gov.au",5.29,1,0,0,1741661091,"unknown",NULL