This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
# Thanks to @golby on Slack: | |
sudo log show --info --debug --predicate 'process == "pythonprompt" AND eventMessage contains[cd] "Showing alert"' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/python3 | |
"""Bulk adds the 'arm64,x86_64' value as and advanced option for '.pkgproj' files. | |
Walks all sub directories specified at '[path]' for '.pkgproj' files, makes a backup | |
file in the same destination. | |
Does not add the value if a value already exists. | |
Usage: ./add_hostArchitectures.py [path] | |
Tested with Python 3.7.9. | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/python3 | |
"""This process unzipped Adobe CC packages and imports them into munki. | |
No copyright. Free for use, but no support provided. | |
This contains some fairly specific behaviour with regards to naming conventions: | |
- Converts filenames to lowercase, and replaces all space characters with '-'. | |
- Appends 'adobe-cc.' to the start of each package filename. | |
- Changes 'install' and 'uninstall' to 'installer' and 'uninstaller'. | |
- Optionally appends a suffix to the filenames and display titles in munki. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/python3 | |
"""Creates the required Choices XML for munki.""" | |
from __future__ import print_function | |
import argparse | |
import os | |
import plistlib | |
import subprocess | |
import sys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Local | |
sudo /usr/sbin/nvram recovery-boot-mode=unused # Boot to local recovery partition. | |
# Internet | |
sudo /usr/sbin/nvram internet-recovery-mode=RecoveryModeNetwork # Internet Recovery (same as SHIFT+OPT+CMD+R) | |
sudo /usr/sbin/nvram internet-recovery-mode=RecoveryModeDisk # Local Recovery Partition (Same as CMD+R) | |
sudo /usr/sbin/nvram internet-recovery-mode=DiagsModeDisk # Local Hardware Diagnostics (Same as D) | |
sudo /usr/sbin/nvram internet-recovery-mode=DiagsModeNetwork # Internet Hardware Diagnostics (Same as OPT+D) | |
# Sourced from |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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>PayloadContent</key> | |
<array> | |
<dict> | |
<key>PayloadContent</key> | |
<dict> | |
<key>com.apple.touristd</key> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Find valid code signing certificates with: | |
#/usr/bin/security find-identity -p codesigning -v | |
#Eg: | |
#[carl@pegasus]:outset # security find-identity -p codesigning -v | |
# 1) A898234JHSDFH38WERKHJSDFLJ2UY4092367HJK9H4J18 "Mac Developer: [email protected] (ABC01FFFGH)" | |
# 1 valid identities found | |
#Code Sign file with: | |
#/usr/bin/codesign -s "Mac Developer: [email protected] (ABC01FFFGH)" -i <bundleID> <file> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
"""Current user logged into macOS, shamelessly stealing macmule's get current | |
logged in user from https://macmule.com/2014/11/19/how-to-get-the-currently-logged-in-user-in-a-more-apple-approved-way/""" | |
import pwd | |
import sys | |
from collections import namedtuple | |
try: | |
from SystemConfiguration import SCDynamicStoreCopyConsoleUser |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This will import a VirtualBox OVA file for the currently logged in user; by default, when `VBoxManage import` is run in | |
# root environment, it will import the VM into a folder in the root user home directory. | |
# Handy for enabling self-service installs of a VM. | |
# The script is _very_ basic and doesn't have any form of version management/removal/upgrade capability, but this | |
# should be relatively easily expandable with the right `VBoxManage` commands. | |
# | |
# This example is for use in a package that doesn't actually install the OVA on disk, but imports it direct from the .pkg | |
# file. Essentially 'payload free', but not ;) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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>PayloadContent</key> | |
<array> | |
<dict> | |
<key>PayloadContent</key> | |
<dict> | |
<key>com.apple.touristd</key> |
NewerOlder