Skip to content

Instantly share code, notes, and snippets.


Chris Buckley cmbuckley

View GitHub Profile
const config = {
'': {
prefix: 'Source',
color: CalendarApp.EventColor.PALE_RED,
visibility: 'private'
function onCalendarChanged(trigger) {
View 617179.php
$headers = [
"Content-Security-Policy: style-src 'self'",
"Content-Type: application/json",
foreach ($headers as $header) {
View amazon-cards.bookmarklet.js
javascript:(function (doc) {
let cards = {
1111: 'Card #1',
2222: 'Card #2',
doc.querySelectorAll('[data-number]').forEach(function (card) {
card.parentNode.querySelector('span').innerText = cards[card.dataset.number]);
View export-photos.applescript
tell application "Photos"
set folderList to name of every folder
set selectedFolders to choose from list folderList with prompt "Select folders:" with multiple selections allowed
set destination to POSIX path of (choose folder with prompt "Please select a backup location:")
repeat with f in folders
if selectedFolders contains name of f then
my exportFolder(f, destination)
end if
cmbuckley / .gitattributes
Last active Dec 7, 2021
Using gron as an external git diff driver
View .gitattributes
*.json diff=gron
cmbuckley / lockdown.json
Last active Oct 22, 2020
Match postcode to COVID lockdown key points
View lockdown.json
"E92000001": {
"country_or_area": "England",
"council": 0,
"wards": 0,
"postcodes": 0,
"full_or_partial": "F",
"key_points": "Your area is under Covid restrictions, in the Tier 1 (medium alert) category for England.",
"meeting_friends_and_family": "* You can mix socially in a group of up to six people from multiple households. This includes children and applies indoors and outdoors, including private homes. \n* Socialising in larger groups is against the law, with fines up to £6,400.\n* There are exceptions, for example if your household or support bubble is larger than six, or if someone enters your house to carry out work, registered childcare or care for a vulnerable person.\n",
cmbuckley /
Last active May 31, 2020
Check for old USERTrust intermediate certificate
# Checks a server certificate chain for old USERTrust intermediate cert,
# which will expire in May 2020.
# Possible output:
# • Error (e.g. cannot connect to host)
# • Not a Sectigo/Comodo chain (cannot find one of the CAs)
# • New USERTrust root cert found (valid, but superfluous)