Skip to content

Instantly share code, notes, and snippets.

Avatar

Per Olofsson MagerValp

View GitHub Profile
@MagerValp
MagerValp / notarize_pkg.sh
Last active Nov 1, 2019
Notarize a signed macOS installer package
View notarize_pkg.sh
#!/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 Sep 14, 2018
Download Mojave 10.14 13A389
View dlmojave.sh
# 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"
View README.md

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 Feb 27, 2018
Macadmin parenting
View playtime.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 / Kernel Extension Policy.mobileconfig
Last active May 2, 2020
Sample kernel extension whitelist for 10.13.4+
View Kernel Extension Policy.mobileconfig
<?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 Jan 26, 2018 — forked from erikng/32bitapps.py
32bitapps.py
View 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 Nov 6, 2017
Helper class for directory service lookups
View dshelper.py
# -*- 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 Sep 25, 2017
Convert markdown to html in a shell script using Xcode's CommonMark framework
View xcodemarkdown.sh
#!/bin/bash
cat <<__MARKDOWN__ |
# Title ÅÄÖ
* list
__MARKDOWN__
/usr/bin/python <( cat <<__EOF__
#!/usr/bin/python
@MagerValp
MagerValp / create_fwupdate_pkg.sh
Last active Sep 20, 2017
Create standalone firmware update pkg for use with Imagr
View create_fwupdate_pkg.sh
#!/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"
@MagerValp
MagerValp / template.py
Created Feb 27, 2017
Python 2 template
View template.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
You can’t perform that action at this time.