Skip to content

Instantly share code, notes, and snippets.

View jc0b's full-sized avatar
💻

Jacob Burley jc0b

💻
View GitHub Profile
{
"MUNKI_REPO" = "/Users/Shared/munki";
"RECIPE_REPOS" = {
"/Users/jacobburley/Library/AutoPkg/RecipeRepos/com.github.autopkg.48kRAM-recipes" = {
URL = "https://github.com/autopkg/48kRAM-recipes.git";
};
"/Users/jacobburley/Library/AutoPkg/RecipeRepos/com.github.autopkg.apettinen-recipes" = {
URL = "https://github.com/autopkg/apettinen-recipes";
};
"/Users/jacobburley/Library/AutoPkg/RecipeRepos/com.github.autopkg.apizz-recipes" = {
> autopkg run -vvvv local.munki.AdobeAcrobatProXIUpdate
Processing local.munki.AdobeAcrobatProXIUpdate...
{'AUTOPKG_VERSION': '2.0.2',
'MAJOR_VERSION': '11',
'MUNKI_REPO': '/Users/Shared/munki',
'MUNKI_REPO_SUBDIR': 'adobe/acrobat',
'NAME': 'AdobeAcrobatPro11_Update',
'PARENT_RECIPES': ['/Users/jacobburley/Library/AutoPkg/RecipeRepos/com.github.autopkg.recipes/AdobeAcrobatPro/AdobeAcrobatProXUpdate.munki.recipe',
'/Users/jacobburley/Library/AutoPkg/RecipeRepos/com.github.autopkg.recipes/AdobeAcrobatPro/AdobeAcrobatProXUpdate.download.recipe'],
'RECIPE_CACHE_DIR': '/Users/jacobburley/Library/AutoPkg/Cache/local.munki.AdobeAcrobatProXIUpdate',
@jc0b
jc0b / gist:7989a63b03672ac377665bc5abc6e7d0
Created February 7, 2023 19:20
Get the boardID/deviceID of a Mac.
import subprocess
def get_board_id():
"""Gets the local device ID on Apple Silicon Macs or the board_id of older Macs"""
ioreg_cmd = ["/usr/sbin/ioreg", "-c", "IOPlatformExpertDevice", "-d", "2"]
try:
ioreg_output = subprocess.check_output(ioreg_cmd).splitlines()
board_id = ""
device_id = ""
for line in ioreg_output:
@jc0b
jc0b / update_nudge.py
Created April 21, 2023 11:34
Gets the latest version of macOS from gdmf.apple.com/v2/pmv, and figures out when to enforce it.
import urllib.request
import json
import ssl
import datetime
# How many days after the release do you want to do this?
ENFORCEMENT_DATE_DELTA=14
# What time (UTC) do you want to have the deadline at?
UTC_UPDATE_TIME=14
@jc0b
jc0b / hostnamer-1.0.plist
Created June 30, 2024 19:28
Munki Computer Namer nopkg
<?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>_metadata</key>
<dict>
<key>created_by</key>
<string>jc0b</string>
<key>creation_date</key>
<date>2024-06-19T21:07:01Z</date>