Skip to content

Instantly share code, notes, and snippets.

View Jaharmi's full-sized avatar
👋
You had me at ‘Hello World’!

Jeremy Reichman Jaharmi

👋
You had me at ‘Hello World’!
  • Landenberg, PA
  • 05:29 (UTC -04:00)
View GitHub Profile
#!/bin/sh
#
# This shell snippet will pre-set CrashReporter's setting for diagnostics submissions
# to Apple and app developers. This seems to also have the side effect of not showing
# the additional "Diagnostics & Usage" dialog at the end of the Setup Assistant,
# because the settings have already been configured in the
# DiagnosticMessagesHistory.plist file.
#
# Modify the SUBMIT_TO_* variables below to either YES or NO to configure the setting.
# They are currently set to the defaults suggested by Apple when the dialog is shown
@Jaharmi
Jaharmi / extract_coretypes_icons.py
Created August 15, 2014 02:35
Extract icons from the OS X CoreTypes bundle while resizing them to 128×128 pixels and converting the images to PNG format.
#!/usr/bin/python
import os
import subprocess
import glob
image_format = "png"
# Get the paths to all icon files in the CoreTypes bundle
coretypes_path = '/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources'
@Jaharmi
Jaharmi / BundlePackageScriptVariablesCommentBlock
Created July 8, 2014 18:27
Apple Installer bundle-style package script variables as a comment block
# http://developer.apple.com/mac/library/documentation/DeveloperTools/Conceptual/SoftwareDistribution/Install_Operations/Install_Operations.html#//apple_ref/doc/uid/10000145i-CH14-SW1
# Arguments
# $1: Full path to the installation package the Installer application is processing.
# $2: Full path to the installation destination.
# $3: Installation volume (or mountpoint) to receive the payload.
# $4: The root directory for the system.
# Environment variables
# $SCRIPT_NAME: Filename of the operation executable.
# $PACKAGE_PATH: Full path to the installation package. Same as $1.
# $INSTALLER_TEMP: Scratch directory used by Installer to place its temporary work files. Install operations may use this area for their temporary work, too, but must not overwrite any Installer files. The Installer application erases this directory at the end of the install.
@Jaharmi
Jaharmi / RecoveryHDExecutablesListMavericks
Created June 14, 2014 20:19
List of executables found via Terminal on OS X Mavericks Recovery HD volume
/usr/bin/arch
/usr/bin/asctl
/usr/bin/awk
/usr/bin/banner
/usr/bin/bsdtar
/usr/bin/c_rehash
/usr/bin/caffeinate
/usr/bin/chflags
/usr/bin/cksum
/usr/bin/codesign
<?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">
<array>
<dict>
<key>attributeSetting</key>
<integer>1</integer>
<key>choiceAttribute</key>
<string>selected</string>
<key>choiceIdentifier</key>
@Jaharmi
Jaharmi / gist:7644523
Created November 25, 2013 16:54
Munki pkginfo “installs” key for the Microsoft Office and Microsoft Component Plugin frameworks on OS X to determine which version of Office 2011 is installed. See also http://www.officeformachelp.com/office/faqs/#faq4 and/or https://github.com/Jaharmi/extension_attribute/blob/master/microsoft_office_version.py
<?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>installs</key>
<array>
<dict>
<key>CFBundleShortVersionString</key>
<string>14.3.8</string>
<key>CFBundleVersion</key>