This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# create a "wireless manifest" for Apple pkg installers. for details | |
# on the manifest see: http://help.apple.com/deployment/osx/#/ior5df10f73a | |
import subprocess | |
from tempfile import mkdtemp | |
import os | |
from xml.dom.minidom import parse, parseString | |
from hashlib import md5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from M2Crypto import X509, BIO, m2 | |
import os | |
from ctypes import CDLL | |
from ctypes import * | |
from ctypes.util import find_library | |
class PKCS7_SIGNED(Structure): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
"""Print files that have a specific length ACL text presentation | |
Used to debug a backup tool that may have been having problems with files | |
with this precise ACL representation. | |
Created by Jesse Peterson on 2/2/16 | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ $# -lt 5 ]; then | |
echo "$0 <host> <user> <datastore> <folder> <filepath>" | |
echo | |
echo " examples:" | |
echo " $0 10.0.0.1 root datastore1 ISOs /tmp/Linux.iso" | |
exit 1 | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
''' | |
reposado update notification: reports changed Apple products between repo_sync runs | |
Checks the current list of updates versus the previous list of updates and | |
reports on the changes. Run this script after your repo_sync run to see the | |
changes between syncs. You can then hand this report off in email if you wish. | |
For example: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
user_id=`id -u` | |
if [ $user_id -ne 0 ]; then | |
echo "$0: must be root" | |
exit 1 | |
fi | |
if [ $# -lt 2 ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* re-implementation of the behaviour that the /usr/bin/defaults application | |
* uses to read sandboxed preference data */ | |
#include <CoreFoundation/CoreFoundation.h> | |
#define EX_BUNDLE_ID "com.apple.mail" | |
#define EX_KEY "JunkMailBehavior" | |
// undocumented, internal CFPreferences API call | |
extern CFDictionaryRef _CFPreferencesCopyApplicationMap(CFStringRef userName, CFStringRef hostName); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
BOARD_ID=`ioreg -p IODeviceTree -r -n / -d 1 | grep board-id | awk '{print $3}' | sed -n 's/\<\"\(Mac-[0-9A-Z]*\)\"\>/\1/p'` | |
grep $BOARD_ID > /dev/null << EOF | |
Mac-031B6874CF7F642A | |
Mac-F2268DC8 | |
Mac-50619A408DB004DA | |
Mac-F2218EA9 | |
Mac-F42D86A9 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# example: | |
# | |
# github_dlextract { "mxcl/homebrew", | |
# path => "/my/path/directory", | |
# rev => "b8c7e203d1", # optional | |
# } | |
define github_dlextract ($repo = $title, $path, $rev = 'master') { | |
file { $path: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Remove *all* components of iLife '11 as installed by the "DVD" installer | |
rm -rf \ | |
"/Applications/iWeb.app" \ | |
"/Library/Audio/Apple Loops/Apple/iLife Sound Effects" \ | |
"/Applications/GarageBand.app" \ | |
"/Library/Audio/Apple Loops/Apple/Apple Loops for GarageBand" \ | |
"/Applications/iDVD.app" \ |