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/python | |
""" | |
Completely reset TCC services database in macOS | |
Note: Both the system and individual users have TCC databases; run the script as both | |
a user and as root to completely reset TCC decisions at all levels. | |
2018-08-15: Resetting the 'Location' service fails; unknown cause | |
2018-08-16: Confirmed the 'All' service does not really reset _all_ | |
services, so individual calls to each service is necessary. |
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/bash | |
APP="${1}" | |
if [ -z "${APP}" ]; then | |
echo "Usage: $(basename ${0}) INSTALL_APP" | |
exit 1 | |
fi | |
tmp_dir=$(/usr/bin/mktemp -d) | |
ESD_DIR="${tmp_dir}/esd" |
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/python | |
import os | |
import sys | |
from CoreFoundation import (CFPreferencesAppValueIsForced, | |
CFPreferencesCopyAppValue, | |
CFPreferencesCopyValue, | |
kCFPreferencesAnyUser, | |
kCFPreferencesAnyHost, |
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/python | |
approved_UUIDs = ['your-beacon-UUID-here'] # see line 64 | |
path_to_lock_sound = '/Users/frogor/Desktop/car_lock.m4a' | |
path_to_warn_sound = '/Users/frogor/Desktop/viper_warning.m4a' | |
import time | |
import objc | |
from objc import NO | |
from Foundation import NSBundle, NSClassFromString, NSObject, NSRunLoop, NSDate, NSUUID, NSMakeRange, NSURL | |
from AVFoundation import AVAudioPlayer |
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
import posixpath, urlparse, urllib2, re, ast, struct, cmd, os, os.path | |
import xml.etree.ElementTree as ET | |
def discover_roms(rom_url): | |
# step 1: based on the URL, download the _files.xml for the details | |
# I could do this a lot easier, but this is more fun | |
url_parts = urlparse.urlsplit(rom_url) | |
base_path, page_path = posixpath.split(url_parts.path) | |
files_path = posixpath.join(url_parts.path, page_path + '_files.xml') | |
new_parts = url_parts._replace(path=files_path) |
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/python | |
import os | |
import pexpect | |
import sys | |
import shutil | |
import subprocess | |
def run(cmd): | |
proc = subprocess.Popen( |
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/python | |
''' | |
reposado update notification: reports changed Apple products between repo_sync runs | |
Checks the current list of updates versus the previous list of updates and | |
reports on the changes. Run this script after your repo_sync run to see the | |
changes between syncs. You can then hand this report off in email if you wish. | |
For example: |
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/python | |
# | |
# getosversionfromdmg.py | |
# | |
# Copyright (c) 2014 The Regents of the University of Michigan | |
# | |
# Retrieves the OS version and build from the InstallESD.dmg contained in | |
# a typical "Install (Mac) OS X <Name>.app" bundle. | |
# | |
# To run: |
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/python | |
# | |
# list_unused_munki_pkgs.py | |
# Tim Sutton | |
# | |
# Simple script to list all Munki pkgs not currently referenced in a specific list | |
# of catalogs. | |
# It does not delete anything. | |
# | |
# CATALOGS can be modified to a list of catalogs in your repo that should be indexed. |