Skip to content

Instantly share code, notes, and snippets.

View gregalia's full-sized avatar

Greg Sheppard gregalia

View GitHub Profile
@gregalia
gregalia / test
Last active July 26, 2025 15:11
test
U2FsdGVkX19/mMDfNp/5SrOe6wlopkOiXEJxFxT915Av4BqnYwn6etvYAeO8w4Fh00QQdwpronwIZcaszqE3KqcTFPc05p0pTjvf7pFZorcgvFDKR3OhGCNx3dEHrUjk3KTeRdwQvX4v+eyIJo4qaqFUKFuPCd6+sn5ksSDdo1F8ocI8ISMiCtDv2PvQXvDDIA9ZFOnSNFXfRHtN8WF/b61ta9uE/qDp2LKbxB+M820p3xbL5lQ0ln2cH6sn/B3m1klSsaR5xlqfhjZOeNBYHyIVgB4ctAXOgWHtKRqBMcj1s+69LPVmQlMM6L620vMnllaFKbvNILpcoLZjQcypuZQ4zUZWYVB/ay6SzD7NdRbUyot1MJ94X4wrd9UfkYdDJvR7A4GIGmwp6Ojg/ST8OZ0bCf03iRjleYG6Wfwl1gGN+D4QZgc6cpnNgGTDd6RpKgt2ySUN5xvpSKH+JeewQYlK3APhr/WaOpLlLHw/fHjy4zBrkdhuOHVr7S5U3O+u4dBV12wlM4Kkyj3lF9I+da3WvJHezGdRw/fSH7g1CFVrMiVGIq11lFy4BX+qZMQm8rw5RXo2e9Eh5UwifmmElIo1Np7x5h2vgm2gCBz1i4wGHW+e/yjj2YFJo9IX34R9ndzD3JEY2DraDlgcp53iZECghYoTOgHL1L7M/Mibzs6I7Df6ibw0XWBE83EN56+aSamwt0V8tHkmZVKXGybuiIdEsyTxjXGarkN3edT05IdGKInclUJFpIPBvCMHKjLvn91m4Oe5plI/FEpmrQ7PJPfQXCcdLHSXnAeMPY8DUwhYh0KHNFZTtlHKkFv5+k6Mr/sS09QLVf5Mnzc4BhVbjC2krtOUt0LFu/xkwORL/crvrGI5s/YhnkojO396NN2fHC+NzrFzcIVfZ7uZRlXftFxquTeWmWcGRxGRFzrXevFzUisnMN27b5vl0kFw7B07UDsXoXYzXsK/xeq+WF6ZKSpiizC09j7TPAvz1pfdXian3pKVSPopabuMEvmTryB8
@gregalia
gregalia / code-snippets.md
Last active February 20, 2025 17:58
Code Snippets

Code Snippets

Mac Stuff

Plist Looping/Get Mac Default URL Handler

#!/usr/bin/env bash

# Other types of handlers, e.g. file extensions
@gregalia
gregalia / main.js
Created March 8, 2022 00:51
Node Cert Check
'use strict';
const tls = require('tls');
// HT: https://medium.com/@keithwan.programming/doing-ssl-certificate-expiry-alert-in-node-js-1714ef15621
const HOSTNAME = 'amazon.com';
const EXPIRATION_DAYS_THRESHOLD = 60;
function checkCertExpiry({ cert, days }) {
@gregalia
gregalia / staggered_rollout_number
Last active September 23, 2024 11:16
Jamf Pro extension attribute for creating arbitrary groups of arbitrary size
#!/bin/bash
####################################################################
# \\\/// #
# / _ _ \ #
# (| (.)(.) |) #
# .-----------------------.OOOo--()--oOOO.-----------------------. #
# | | #
# | Test whether the machine has assigned itself a random number | #
# | for rolling out policies in staggered groups and assign one | #

Keybase proof

I hereby claim:

  • I am thegoodsheppard on github.
  • I am thegoodsheppard (https://keybase.io/thegoodsheppard) on keybase.
  • I have a public key ASBul9257xIZWdk-pcOHjI4dfYXojm_237UgUciy68lK3go

To claim this, I am signing this object: