Skip to content

Instantly share code, notes, and snippets.

@MagerValp
MagerValp / get_teams_url.py
Created October 12, 2023 10:20
Get latest Teams download URL for macOS
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import io
import sys
import argparse
import json
import urllib.request
@MagerValp
MagerValp / notarize_pkg.sh
Last active March 5, 2023 02:04
Notarize a signed macOS installer package
#!/bin/bash
set -o errexit
set -o pipefail
if ! source notarization_config.sh; then
# Configure here and add the password for your Apple ID to the keychain:
# security add-generic-password -a "_NOTARIZATION_APPLE_ID_" -w "_APP_SPECIFIC_PASSWORD_" -s "NOTARIZATION_PASSWORD"
@MagerValp
MagerValp / dlmojave.sh
Created September 14, 2018 15:27
Download Mojave 10.14 13A389
# Install 10.14 and then run this to download the Mojave installer app
open "x-apple.systempreferences:com.apple.preferences.softwareupdate?client=bau&installMajorOSBundle=com.apple.InstallAssistant.Mojave"

FixAuthAuth

Here are my scripts to fix accounts affected by an extraneous apostrophe in the Authentication Authority after being migrated from mobile to local, as written up in Rich's blog post. While I've successfull rolled them out in our environment, I had to remove some site specific logic before publishing them here, so make sure you test them carefully.

@MagerValp
MagerValp / playtime.py
Created February 27, 2018 18:41
Macadmin parenting
#!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
import io
import sys
import codecs
@MagerValp
MagerValp / Kernel Extension Policy.mobileconfig
Last active May 2, 2020 15:27
Sample kernel extension whitelist for 10.13.4+
<?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>AllowUserOverrides</key>
<true/>
<key>AllowedTeamIdentifiers</key>
@MagerValp
MagerValp / 32bitapps.py
Last active January 26, 2018 04:54 — forked from erikng/32bitapps.py
32bitapps.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
import io
import sys
import codecs
@MagerValp
MagerValp / dshelper.py
Created November 6, 2017 11:29
Helper class for directory service lookups
# -*- coding: utf-8 -*-
"""Directory Services helper class."""
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
@MagerValp
MagerValp / xcodemarkdown.sh
Created September 25, 2017 18:51
Convert markdown to html in a shell script using Xcode's CommonMark framework
#!/bin/bash
cat <<__MARKDOWN__ |
# Title ÅÄÖ
* list
__MARKDOWN__
/usr/bin/python <( cat <<__EOF__
#!/usr/bin/python
@MagerValp
MagerValp / create_fwupdate_pkg.sh
Last active September 20, 2017 17:33
Create standalone firmware update pkg for use with Imagr
#!/bin/bash
set -o errexit
PKG_NAME="FWUpdate"
PKG_ID="se.gu.it.FWUpdateStandalone.pkg"
datestamp=$( date "+%Y%m%d" )
PKG_VERSION="1.0.$datestamp"