Skip to content

Instantly share code, notes, and snippets.

{
"checkbox": [
{
"icon": "https://upload.wikimedia.org/wikipedia/commons/e/e7/Firefox_logo%2C_2019.png",
"label": "Firefox",
"checked": false
},
{
"icon": "https://upload.wikimedia.org/wikipedia/commons/e/e7/Firefox_logo%2C_2019.png",
"label": "Firefox",
@joncrain
joncrain / enable_nomadlogin.pkginfo
Last active September 4, 2020 13:32
NoPKG for Enabling NoMAD Login
<?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>_metadata</key>
<dict>
<key>created_by</key>
<string>Jon Crain</string>
<key>creation_date</key>
<date>2020-09-3T18:05:47Z</date>
{
"use-global":false,
"persistent-apps": [
"/Applications/Firefox.app",
"/Applications/Adobe Acrobat DC/Adobe Acrobat.app",
"/Applications/Adobe Bridge CC 2019/Adobe Bridge CC 2019.app",
"/Applications/Adobe Lightroom Classic/Adobe Lightroom Classic.app",
"/Applications/Photo Mechanic 5.app",
"/Applications/Adobe Photoshop CC 2019/Adobe Photoshop CC 2019.app",
"/Applications/Adobe Illustrator CC 2019/Adobe Illustrator.app",
<?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>OnDemand</key>
<true/>
<key>RestartAction</key>
<string>RequireRestart</string>
<key>_metadata</key>
<dict>
@joncrain
joncrain / mr_upgrade_testing.sh
Created April 19, 2019 02:30
Pseudo-code script for testing out upgrades
git clone -b v2.7.3 https://github.com/munkireport/munkireport-php.git ./test
cd ./test
cp config_default.php ./config.php
echo "\$conf['auth']['auth_noauth'] = array();" >> ./config.php
php -S localhost:8080 -t ./ # this will run site locally
### in another terminal run the following
sudo /bin/bash -c "$(curl -s http://localhost:8080/index.php?/install)"
sudo /usr/local/munki/preflight && /usr/local/munki/postflight
git pull origin master
# stop web server (it's served out of public now)
#!/usr/bin/python
import os
import datetime
import subprocess
import json
import urllib
import urllib2
import shutil
import tarfile
@joncrain
joncrain / setup.sh
Last active April 20, 2021 15:39
New MunkiReport dev environment including a new module
#!/bin/bash
dev_site_root=~/Documents/munkireport-awesome
module_name=awesome
git clone https://github.com/munkireport/munkireport-php.git $dev_site_root
cd $dev_site_root
#### Choose the branch to load:
# git checkout master
<?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>PayloadIdentifier</key>
<string>com.example.tcc</string>
<key>_metadata</key>
<dict>
<key>catalog_promotion_date</key>
<string>2019-01-16</string>
<?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>PayloadIdentifier</key>
<string>org.domain.kextpolicy</string>
<key>_metadata</key>
<dict>
<key>catalog_promotion_date</key>
<string>2018-11-01</string>
#!/bin/bash
# Application SAP Codes and versions found here: https://helpx.adobe.com/enterprise/package/help/apps-deployed-without-their-base-versions.html
# check if root
if [[ $EUID != 0 ]] ; then
echo "Remote Update Manager: Please run this as root, or via sudo."
exit -1
fi