Skip to content

Instantly share code, notes, and snippets.

View weswhet's full-sized avatar

Wesley Whetstone weswhet

View GitHub Profile
@weswhet
weswhet / mscupdate.py
Last active March 5, 2024 20:53
quit, update, and reopen all apps that have an update available in Managed Software Center.
#!/usr/local/munki/munki-python
import argparse
import os
import pathlib
import plistlib
import pprint
import pwd
import subprocess
from time import sleep
@weswhet
weswhet / mac_system.py
Last active July 31, 2018 00:08
Custom salt state to make sure the computer name is set correctly.
# -*- coding: utf-8 -*-
'''
State for setting computer names on macOS.
.. code-block:: yaml
set_computer_name_to_wesbook:
system.set_computer_name:
- name: wesbook
'''
@weswhet
weswhet / install.log
Created May 22, 2018 21:56
1password7 install log
2018-05-22 14:04:29-07 wesbook-test-13mbp Installer[18891]: @(#)PROGRAM:Install PROJECT:Install-1000
2018-05-22 14:04:29-07 wesbook-test-13mbp Installer[18891]: @(#)PROGRAM:Installer PROJECT:Installer-920
2018-05-22 14:04:29-07 wesbook-test-13mbp Installer[18891]: Hardware: MacBookPro12,1 @ 3.10 GHz (x 4), 16384 MB RAM
2018-05-22 14:04:29-07 wesbook-test-13mbp Installer[18891]: Running OS Build: Mac OS X 10.13.4 (17E202)
2018-05-22 14:04:29-07 wesbook-test-13mbp Installer[18891]: Env: __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
2018-05-22 14:04:29-07 wesbook-test-13mbp Installer[18891]: Env: TMPDIR=/var/folders/tp/nw_tz52n37gbqh3rk1t1qfym0000gn/T/
2018-05-22 14:04:29-07 wesbook-test-13mbp Installer[18891]: Env: HOME=/Users/wes
2018-05-22 14:04:29-07 wesbook-test-13mbp Installer[18891]: Env: SHELL=/usr/local/bin/fish
2018-05-22 14:04:29-07 wesbook-test-13mbp Installer[18891]: Env: Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.YxLa5cat3t/Render
2018-05-22 14:04:29-07 wesbook-test-13mbp Installer[18891]:
@weswhet
weswhet / crypt-mech-check.plist
Created August 18, 2017 16:04
munki pkginfo for checking that the Crypt Mechanisms are in the Authorization Database.
<?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>autoremove</key>
<false/>
<key>blocking_applications</key>
<array/>
<key>catalogs</key>
<array>
#!/usr/bin/python
import sys
import os
import subprocess
import datetime
from Foundation import NSDate, NSMetadataQuery, NSPredicate, NSRunLoop
from Foundation import CFPreferencesAppSynchronize
from Foundation import CFPreferencesCopyAppValue
from Foundation import CFPreferencesCopyKeyList