Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/python
# http://wallreborn.com/wp-content/uploads/2015/05/cool-desktop-backgrounds-8-Cool-Wallpaper.jpg
# is a pretty sweet example to try with
# Then run this script from the Terminal :)
import multiprocessing, time, os.path, argparse, sys
parser = argparse.ArgumentParser(description='Sets the overlaid backdrop')
@erikng
erikng / bsexec
Created July 14, 2015 13:59
Yoyo vs ElYoyo
Yoyo
launchctl bsexec `ps auwwx |grep [l]oginwindow | awk '{ print $2 }'` echo test
test
ElYoyo
launchctl bsexec `ps auwwx |grep [l]oginwindow | awk '{ print $2 }'` echo test
task_for_pid(): 0x5
@erikng
erikng / makefile
Created July 17, 2015 04:41
Luggage Example for Payload free
USE_PKGBUILD=1
include /usr/local/share/luggage/luggage.make
NO_PAYLOAD=1
TITLE=LuggagePayloadFreeExample
REVERSE_DOMAIN=org.yourorg.pkg
PAYLOAD= \
pack-script-postinstall
<key>description</key>
<string>With a streamlined design and intuitive editing features, iMovie lets you enjoy your videos and tell stories like never before. Browse your video library, share favorite moments, and create beautiful HD movies and Hollywood-style trailers. And with iCloud,
you can enjoy them on all your devices in iMovie Theater.
&lt;p /&gt;
&lt;p /&gt;Browse and share video
&lt;p /&gt;• See all your video organized in one place
&lt;p /&gt;• Quickly share a clip or a portion of a clip
&lt;p /&gt;• Background import lets you begin watching and sharing video instantly
&lt;p /&gt;
&lt;p /&gt;Make Hollywood-style trailers
@erikng
erikng / msu.log
Last active August 29, 2015 14:26
Jul 29 2015 15:25:05 -0500 ERROR: Unexpected error in appleupdates:
Jul 29 2015 15:25:05 -0500 Traceback (most recent call last):
File "/usr/local/munki/managedsoftwareupdate", line 788, in main
forcecatalogrefresh=force_catalog_refresh)
File "/usr/local/munki/munkilib/appleupdates.py", line 1692, in appleSoftwareUpdatesAvailable
appleUpdatesObject = getAppleUpdatesInstance()
File "/usr/local/munki/munkilib/appleupdates.py", line 1667, in getAppleUpdatesInstance
apple_updates_object = AppleUpdates()
File "/usr/local/munki/munkilib/appleupdates.py", line 153, in __init__
self._ResetOriginalCatalogURL()
@erikng
erikng / yay.log
Created July 29, 2015 21:39
msu2.log
Jul 29 2015 16:31:18 -0500 Installing available Apple Software Updates...
Jul 29 2015 16:31:18 -0500 softwareupdate: Changed catalog to https://swscan.apple.com/content/catalogs/others/index-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog
Jul 29 2015 16:31:18 -0500 DEBUG1: softwareupdate cmd: ['/usr/local/munki/ptyexec', '/usr/sbin/softwareupdate', '-v', '-i', u'iTunesX-12.2.1', '--no-scan']
Jul 29 2015 16:31:19 -0500 iTunesX-12.2.1: No such update
Jul 29 2015 16:31:19 -0500 No updates are available.
Jul 29 2015 16:31:20 -0500 softwareupdate: Changed catalog to Apple production
Jul 29 2015 16:31:20 -0500 WARNING: Apple update iTunes, zzzz031-27842 failed to install. No record of success or failure.
Jul 29 2015 16:31:20 -0500 Finishing...
@erikng
erikng / Office2016-15.11.2.plist
Last active August 29, 2015 14:26
O2016_installs_munki
<?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>erik</string>
<key>creation_date</key>
<date>2015-08-05T14:27:18Z</date>
#!/usr/bin/python
import plistlib, os.path, os
# Based off of https://forums.developer.apple.com/message/6741
# and http://apple.stackexchange.com/a/136976
def jdk_info_plists():
# Find all the JDK Info.plist files
JDK_ROOT = "/Library/Java/JavaVirtualMachines"
if (os.path.exists(JDK_ROOT) and os.path.isdir(JDK_ROOT)):
@erikng
erikng / z-automator.png
Last active August 31, 2015 20:16 — forked from lrytz/z-automator.png
Shortcut for Syntax Highlighting in Keynote
@erikng
erikng / cw.sh
Last active September 16, 2015 15:44
CacheWarmer
#!/bin/bash
# CacheWarmer script to pre-cache iOS
## Version 12
## http://mesu.apple.com/assets/com_apple_MobileAsset_SoftwareUpdate/com_apple_MobileAsset_SoftwareUpdate.xml
## https://theiphonewiki.com/wiki/Models
## http://www.everyi.com/by-identifier/ipod-iphone-ipad-specs-by-model-identifier.html
######## AppleTVs