Skip to content

Instantly share code, notes, and snippets.

@homebysix
homebysix / filevault_escrow_helper-1.0.plist
Created September 20, 2023 14:31
Escrow Buddy logout pkginfo for Munki
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>RestartAction</key>
<string>RequireLogout</string>
<key>catalogs</key>
<array>
<string>testing</string>
</array>
@homebysix
homebysix / ModifyAuthDBLoginMechs.sh
Last active June 18, 2023 03:55
macos-authdb-mechs
#!/bin/bash
###
#
# Name: ModifyAuthDBLoginMechs.sh
# Description: This script provides functions that can help Mac IT
# administrators modify and maintain the list of
# login mechanisms in the macOS authorization database.
# For details see:
# https://www.elliotjordan.com/posts/macos-authdb-mechs
@homebysix
homebysix / update_changelog_diffs.py
Created November 16, 2021 06:29
update_changelog_diffs.py
#!/usr/bin/env python3
"""Given the path to a Markdown-formatted change log, this script will update
the diff links for each version at the bottom of the document. For an example
of the diff links, see: https://keepachangelog.com
Currently only supports GitHub, GitLab, and Bitbucket diff links.
"""
@homebysix
homebysix / docklib_example.py
Last active June 4, 2023 20:13
docklib_example.py
#!/usr/local/bin/managed_python3
"""docklib_example.py
This example script demonstrates how Mac admins can use the docklib module to
manage the default state of Mac users' Docks. The script is meant to run at
login in user context using a tool like Outset or a custom LaunchAgent.
For details, see: https://www.elliotjordan.com/posts/resilient-docklib/
"""
@homebysix
homebysix / .pre-commit-config.yaml
Last active June 28, 2021 16:54
Pre-commit config for private AutoPkg recipe repository (with processors)
repos:
- repo: https://github.com/homebysix/pre-commit-macadmin
rev: v1.10.1
hooks:
- id: check-autopkg-recipes
args: [
"--recipe-prefix=com.pretendco.cpe.",
"--override-prefix=local.",
"--strict",
"--",
@homebysix
homebysix / .pre-commit-config.yaml
Last active June 28, 2021 16:55
Pre-commit config for private AutoPkg recipe repository (YAML recipes and overrides)
repos:
- repo: https://github.com/homebysix/pre-commit-macadmin
rev: v1.10.1
hooks:
- id: check-autopkg-recipes
args: [
"--recipe-prefix=com.pretendco.cpe.",
"--override-prefix=local.",
"--",
]
@homebysix
homebysix / .pre-commit-config.yaml
Last active June 28, 2021 16:55
Pre-commit config for public AutoPkg recipe repository (with processors)
repos:
- repo: https://github.com/homebysix/pre-commit-macadmin
rev: v1.10.1
hooks:
- id: check-autopkg-recipes
args: [
"--recipe-prefix=com.github.yourusername.",
"--strict",
"--",
]
@homebysix
homebysix / .pre-commit-config.yaml
Last active June 28, 2021 16:55
Pre-commit config for public AutoPkg recipe repository (extended)
repos:
- repo: https://github.com/homebysix/pre-commit-macadmin
rev: v1.10.1
hooks:
- id: check-autopkg-recipes
args: [
"--recipe-prefix=com.github.yourusername.",
"--strict",
"--",
]
@homebysix
homebysix / .pre-commit-config.yaml
Last active June 28, 2021 16:46
Pre-commit config for public AutoPkg recipe repository (basic)
repos:
- repo: https://github.com/homebysix/pre-commit-macadmin
rev: v1.10.1
hooks:
- id: check-autopkg-recipes
args: ["--recipe-prefix=com.github.yourusername."]
- id: forbid-autopkg-overrides
- id: forbid-autopkg-trust-info
@homebysix
homebysix / anonymizer.py
Created April 5, 2021 23:23
anonymizer.py
#!/usr/bin/env python3
"""
Name: anonymizer.py
Description: Simple Python script that anonymizes personal and company
information in an input file. Useful for running on logs
and Terminal outputs before sharing on GitHub or Slack.
Author: Elliot Jordan <elliot@elliotjordan.com>
Created: 2021-02-03