Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/python
'''Uses Cocoa classes via PyObjC to set a desktop picture on all screens.
Modified script to read from com.apple.desktop via MCX
Tested on Mavericks.
See:
https://developer.apple.com/library/mac/documentation/cocoa/reference/applicationkit/classes/NSWorkspace_Class/Reference/Reference.html
@erikng
erikng / swupd.conf
Created July 25, 2014 00:40
Mountain Lion Server - Yosemite Client Support
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} Darwin/9
RewriteRule ^/index\.sucatalog$ http://%{HTTP_HOST}/cgi-bin/SoftwareUpdateServerGetCatalog?/index-leopard.merged-1.sucatalog
RewriteCond %{HTTP_USER_AGENT} Darwin/10
RewriteRule ^/index\.sucatalog$ http://%{HTTP_HOST}/cgi-bin/SoftwareUpdateServerGetCatalog?/index-leopard-snowleopard.merged-1.sucatalog
RewriteCond %{HTTP_USER_AGENT} Darwin/11
RewriteRule ^/index\.sucatalog$ http://%{HTTP_HOST}/cgi-bin/SoftwareUpdateServerGetCatalog?/index-lion-snowleopard-leopard.merged-1.sucatalog
RewriteCond %{HTTP_USER_AGENT} Darwin/12
RewriteRule ^/index\.sucatalog$ http://%{HTTP_HOST}/cgi-bin/SoftwareUpdateServerGetCatalog?/index-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog
@erikng
erikng / gist:a78784af1fe3a4f3c125
Created March 11, 2015 13:50
InstaDMG 10.7 10-2014
# Creates a 10.7 image with all the items that would appear in software update
Installer Disc Builds: 11A511, 11B26, 11C74, 11D50, 11E53, 11G63
Output Volume Name: Macintosh HD
Output File Name: 10.7 Vanilla
OS Updates:
# We're assuming you're using the newest 10.7.5 build 11G63 as your install 'media', otherwise you'll need to track down the combo updater and the supplemental update
iTunes 12.0.1 https://secure-appldnld.apple.com/iTunes12/031-08057.20141016.NewRe/iTunes12.0.1.dmg sha1:0b0b6b00dbca55e272fab2fca3f59536cf119a8a
MacBookPro13(5400)-9_2
67 MB/s
70.9 MB/s
MacBookPro13(Flash)-12_1
1065 MB/s
1035 MB/s
MacBookPro15(Flash)-11_2
289.7 MB/s
598.7 MB/s
MacBookAir11(Flash)-7_1
<?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>SupportedBoardIds</key>
<array>
<string>Mac-031B6874CF7F642A</string>
<string>Mac-F2268DC8</string>
<string>Mac-F22587C8</string>
<string>Mac-50619A408DB004DA</string>
@erikng
erikng / AdobeFontFix-1.1.plist
Last active August 29, 2015 14:18
Possible Fix for Office 2011 / Adobe CS 6
<?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>autoremove</key>
<false/>
<key>catalogs</key>
<array>
<string>production</string>
</array>
@erikng
erikng / EnabledSystemIdentifiers
Created May 6, 2015 14:15
Yosemite 10.10.3 Model Identifiers
<key>EnabledSystemIdentifiers</key>
<array>
<string>iMac7,1</string>
<string>iMac8,1</string>
<string>iMac9,1</string>
<string>iMac10,1</string>
<string>iMac11,1</string>
<string>iMac11,2</string>
<string>iMac11,3</string>
<string>iMac12,1</string>
@erikng
erikng / AdobeReader1-1.mobileconfig
Created May 18, 2015 17:26
AdobeReader-1.1.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>PayloadIdentifier</key>
<string>org.ybiybi.profile.adobereader</string>
<key>PayloadRemovalDisallowed</key>
<true/>
<key>PayloadScope</key>
<string>System</string>
@erikng
erikng / gist:6bc1c1d8c94383b0fd08
Last active August 29, 2015 14:23
cosxip_yoyo_vs_elcap
10.10.3 R2
<key>receipts</key>
<array>
<dict>
<key>packageid</key>
<string>com.apple.pkg.BaseSystemBinaries</string>
<key>version</key>
<string>10.10.0.1.1.1429034296</string>
</dict>
@erikng
erikng / output.txt
Created July 9, 2015 13:37
BoxEdit Silent
/Volumes/Box\ Edit\ Installer/Install\ Box\ Edit.app/Contents/MacOS/Box\ Edit\ Installer -silent
2015-07-09 08:34:41:914 Box Edit Installer[14255:513] XXX ================== Starting up ================== XXX
2015-07-09 08:34:41.925 Box Edit Installer[14255:2856902] Failed to connect (errorWrapUpLabel) outlet from (BXDialogsViewController) to (NSTextField): missing setter or instance variable
2015-07-09 08:34:41:927 Box Edit Installer[14255:513] Checking for file at: file:///Applications/Box%20Edit.app
2015-07-09 08:34:41:927 Box Edit Installer[14255:513] Checking for file at: file:///Library/Internet%20Plug-Ins/Box%20Edit.plugin
2015-07-09 08:34:41:927 Box Edit Installer[14255:513] Checking for file at: file:///Users/vm/Library/Application%20Support/Box/Box%20Edit/Box%20Edit.app
2015-07-09 08:34:41:927 Box Edit Installer[14255:513] Checking for file at: file:///Users/vm/Library/Internet%20Plug-Ins/Box%20Edit.plugin
2015-07-09 08:34:41:927 Box Edit Installer[14255:513] Checking for file at: file:///Users/vm/L