Skip to content

Instantly share code, notes, and snippets.


Timothy Sutton timsutton

View GitHub Profile
timsutton /
Created Apr 9, 2017
Use AutoPkg and Rich Trouton's VMware Tools recipe to download and install the 'darwin' VMware guest tools on a macOS system
#!/bin/sh -e
# Downloading VMware Tools within guest automatically using AutoPkg and Rich Trouton's
# VMware Tools recipe - used within ESXi build to workaround complicated tools
# upload issues (
tmpdir=$(mktemp -d /tmp/vmware-tools-XXXXXX)
cd "${tmpdir}"
timsutton /
Created Mar 29, 2017
Munki conditional for checking eligible OS upgrades
# encoding: utf-8
# Modified from Hannes Juutilainen's
# and scripts from
# Hannes Juutilainen <>
# Modified to return a single condition, `supported_major_os_upgrades`, which is
timsutton / gist:2c38c1fb90383e8093bec3d90b88929b
Last active Mar 10, 2017
Spotify Mac executable modes in 1.0.50 vs. 1.0.49
View gist:2c38c1fb90383e8093bec3d90b88929b
# In 1.0.50, no user besides the one who installed Spotify will be able to execute it. This means either other users on the system,
# or, if Spotify was deployed using any mass-deployment tool or installer package, and is owned by the root user, Spotify will not
# launch for anyone.
# Dir listing comparisons courtesy of
# 1.0.50
$ ls -l /Volumes/Spotify/
total 63160
-rwxr--r-- 1 homeadmin staff 30076384 Mar 1 13:36 Spotify
timsutton /
Last active Apr 24, 2019
Repackage the Sibelius 7.5 sounds into a standard package
#!/bin/sh -eu
# Run the Sibelius 7.5 sounds installer, which will unpack sample data as well as some metadata, all into
# a 'Sibelius Sounds' directory. SOUNDS_SRC in this script points to this directory by default, but
# alternatively one could back up the Sibelius Sounds directory to a server and then change SOUNDS_SRC to
# that location.
# Note that 'Sibelius Sounds' is the top-level directory, and it contains another directory within with
# the same name (alongside 'Libraries').
timsutton /
Last active Feb 22, 2017
Postinstall script to finish setting up Malwarebytes AntiMalware for Mac
declare -r mbam_helper="/Applications/Malwarebytes"
declare -r privtools=/Library/PrivilegedHelperTools
declare -r launchd_plist=/Library/LaunchDaemons/com.malwarebytes.HelperTool.plist
# install helper tool
if [ ! -d ${privtools} ]; then
/bin/mkdir -p "${privtools}"
/bin/chmod 1755 "${privtools}"
timsutton /
Created Feb 16, 2017
One of roughly a dozen scripts and binaries used to simply copy an application, some plugins, and some audio files to a fixed location
# This postflight script echoes the values of the available
# arguments and environmental variables.
echo "BEGIN postlight script"
echo "$0"
echo "$1"
echo "$2"
timsutton /
Last active Feb 7, 2017
Update all installed Adobe product install metadata to suppress the "Sign into Adobe CC" dialog box. This will likely make its way into
# pylint: disable=locally-disabled, line-too-long
from __future__ import print_function
import os
import re
import sys
from glob import glob
timsutton / vmware-fusion.rb
Last active Mar 4, 2017
Custom VMware Fusion 8 Cask file patching an older vmnet-natd binary
View vmware-fusion.rb
require 'digest'
require 'tempfile'
VMNET_NATD_MD5 = 'e347f5c8d86640af5102852c897e31cc'
cask 'vmware-fusion' do
version '8.5.3-4696910'
sha256 '68d3f5b4379302138f3d1060ec270b960a531e28177f8b30c5431390912b6337'
url "{version}.dmg"
appcast '',
timsutton /
Created Jan 19, 2017
Simple Bash script that repackages and copies Unity 3d 5 packages to a Munki repo
#!/bin/bash -eu
# This script takes a directory containing flat packages. It expands
# them all, uses `xmlstarlet` to edit pkg-info 'version' attribute
# to the one given by VERSION, and flattens them back, saving them
# as "pkgname-VERSION.pkg"
# Use the Unity download assistant to download the packages in a VM
# to avoid actually installing them by accident on the machine, and
# then run this script. Currently we download:
timsutton / apfs_cli_tools.txt
Last active Feb 7, 2020
apfs tools in Sierra
View apfs_cli_tools.txt
➜ ~ sw_vers
ProductName: Mac OS X
ProductVersion: 10.12.1
BuildVersion: 16B2333a
➜ ~ ls -l /System/Library/Filesystems/apfs.fs/Contents/Resources
total 2088
-rwxr-xr-x 1 root wheel 349760 22 Sep 03:48 apfs.util
-rwxr-xr-x 1 root wheel 352880 22 Sep 03:48 apfs_invert