Skip to content

Instantly share code, notes, and snippets.

View timsutton's full-sized avatar
🍁

Timothy Sutton timsutton

🍁
View GitHub Profile
@timsutton
timsutton / postinstall.sh
Created October 3, 2014 20:17
Version comparison in Bash, by Seagate
function cmpvers()
{
if [ "$1" == "$2" ]
then
echo 0
else
if [ -z "$2" ]
then
echo 1
else
@timsutton
timsutton / JavaForOSX-2014.001.plist
Created October 21, 2014 18:40
Java for OS X pkginfo
<?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>tsutton</string>
<key>creation_date</key>
<date>2014-10-06T13:18:30Z</date>
<?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>tsutton</string>
<key>creation_date</key>
<date>2014-10-20T14:55:20Z</date>
@timsutton
timsutton / gist:d5cfbe1bfd960fdb0c53
Created October 23, 2014 13:16
strings from Yosemite Setup Assistant
strings /System/Library/CoreServices/Setup\ Assistant.app/Contents/SharedSupport/MiniLauncher
/System/Library/CoreServices/SetupAssistantPlugins
flplugin
NSArray *_MBFirstLoginPlugins(BOOL, BOOL)
First Login Plugins: Failed to get bundle identifier for plugin at path: %@
First Login Plugins: Failed to get plugin object for plugin at path: %@
First Login Plugins: duplicate plugins on disk with id '%@', only one will be used
q24@?0@"<MBFirstLoginConfiguration>"8@"<MBFirstLoginConfiguration>"16
id<MBFirstLoginConfiguration> _MBFirstLoginPluginFromBundle(NSBundle *)
@timsutton
timsutton / SoftwareUpdate.m
Last active August 29, 2015 14:08
Hopper pseudo-code from from SoftwareUpdate private framework
function methImpl_SUBackgroundManager__evaluateScanRequirements {
rbx = rdi;
rbx._doCriticalAndConfigDataOnly = 0x0;
rbx._timeToScan = 0x0;
r13 = *objc_msgSend;
rax = [SUSharedPrefs sharedPrefManager];
rax = [rax isCheckScheduled];
if (rax != 0x0) {
r13 = *objc_msgSend;
var_0 = rbx;
Managed Software Update Tool
Copyright 2010-2014 The Munki Project
http://code.google.com/p/munki
Starting...
ERROR: Unexpected error in updatecheck:
Traceback (most recent call last):
File "./managedsoftwareupdate", line 991, in <module>
main()
File "./managedsoftwareupdate", line 703, in main
@timsutton
timsutton / convert_mavericks_image.sh
Created November 6, 2014 22:13
convert_mavericks_image from Parallels 10
#!/bin/bash
#
# This script converts a Mavericks app bundle to a bootable dmg image file
# in a few steps:
# - Converts the BaseSystem.dmg image file to a writable format and resizes it
# to contain additional data.
# - Replaces the Packages symlink with the Packages folder from the
# InstallESD.dmg image file.
# - Adds the BaseSystem.dmg and BaseSystem.chunklist
@timsutton
timsutton / Notes.md
Last active August 29, 2015 14:08 — forked from arubdesu/Notes.txt
@timsutton
timsutton / set_crashreport_autosubmit_settings.sh
Last active August 29, 2015 14:09
Script to configure Crash Reporter's Diagnostics Submissions and thereby suppress the dialog displayed in Setup Assistant on 10.10.
#!/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
@timsutton
timsutton / diagnostics_agent.m
Created November 17, 2014 20:33
open -a /Applications/Hopper\ Disassembler.app /System/Library/CoreServices/diagnostics_agent
function methImpl_ActivityTracker__resetAutoSubmitPref {
r15 = rdi;
rax = CFNumberGetTypeID();
rax = _CRCopyDiagnosticMessagesHistoryValue(@"AutoSubmitVersion", rax);
if (rax == 0x0) goto loc_10000db7b;
goto loc_10000db57;
loc_10000db7b:
rax = _CRSetDiagnosticMessagesHistoryValue(@"Canary", **kCFBooleanTrue, &var_24);
if (rax == 0x0) goto loc_10000de09;