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/python3 | |
| # this script patches Munki's makecatalogslib.py file to skip over any files or | |
| # folders containing @eaDir. if you're hosting your munki repo on a Synology, | |
| # then you've likely seen the ton of noisy error output makecatalogs generates | |
| # due to these @eaDir files. this patch skips those files thus silencing those errors. | |
| import os | |
| import shutil | |
| import getpass |
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 | |
| import subprocess | |
| def termy(cmd): | |
| task = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) | |
| out, err = task.communicate() | |
| return(out.decode('utf-8'), err) | |
| user, err = termy( | |
| ['/usr/bin/stat', '-f', '"%Su"', '/dev/console'] |
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
| # | |
| # get all .mobileconfig profiles and add them to SimpleMDM as custom profiles | |
| # using Lucas' fork of simpleMDMpy https://github.com/lucasjhall/simpleMDMpy | |
| # dropped the SimpleMDMpy folder into /usr/local/lib/python3.9/site-packages/ (or whatever your Python 3 path is) | |
| # | |
| api_key = '' | |
| mdm_dir = pathlib.Path('/Users/bryanh/Documents/dev/profiles/mdm/') | |
| tcc_dir = mdm_dir / 'tcc' |
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 | |
| # get the console user, root if it's at the login window | |
| theUser=$(/usr/bin/stat -f "%Su" /dev/console) | |
| # check for and exit if root | |
| [[ $theUser == "root" ]] && exit 0 | |
| # should be a logged in user, reopen 1Password | |
| /usr/bin/su - $theUser -c "open -b com.agilebits.onepassword7" |
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
| # pip install mutagen | |
| from mutagen.mp4 import MP4, MP4Cover | |
| video = MP4('video.mp4') | |
| # set a TV show series name | |
| video['tvsh'] = "TV SHOW NAME" | |
| # set the episode title | |
| video['\xa9nam'] = "EPISODE TITLE" | |
| # set the video type to a TV Show |
OlderNewer