This file contains 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
% ./autopkg run Firefox.install -v | |
Processing Firefox.install... | |
MozillaURLProvider | |
MozillaURLProvider: Found URL http://ftp.mozilla.org/pub/mozilla.org//firefox/releases/latest/mac/en-US/Firefox%2031.0.dmg | |
URLDownloader | |
URLDownloader: Storing new Last-Modified header: Thu, 17 Jul 2014 03:38:41 GMT | |
URLDownloader: Storing new ETag header: "4b25e62-3c17d83-4fe5b607b1240" | |
URLDownloader: Downloaded /Users/gneagle/Library/AutoPkg/Cache/com.github.autopkg.install.Firefox_EN/downloads/Firefox.dmg | |
EndOfCheckPhase | |
AppDmgVersioner |
This file contains 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
# printers.rb | |
Facter.add('printers') do | |
confine :kernel => %w{Linux FreeBSD OpenBSD SunOS Darwin} | |
confine do | |
Facter::Core::Execution.which('lpstat') | |
end | |
setcode do | |
output = Array.new |
This file contains 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
<?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> |
This file contains 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
openssl smime -sign -nodetach -in "My Awesome.mobileconfig" -signer MyAwesomeCert.pem -inkey MyAwesome.key -outform DER -out "My Awesome Signed.mobileconfig" -certfile MyAwesomeCert.pem |
This file contains 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
import tempfile, os.path, shutil, glob, os, subprocess, re | |
debug = True | |
# It should take the logs from tmp and clone them somewhere | |
# It can then bunzip and combine them | |
def log(s): | |
global debug | |
if debug: | |
print s |
This file contains 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
def default_interface(): | |
# 203.0.113.1 is reserved in TEST-NET-3 per RFC5737 | |
# Should never be local, essentially equal to "internet" | |
# This should get the 'default' interface | |
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | |
try: | |
# Uses UDP for instant 'connect' and port 9 for discard | |
# protocol: http://en.wikipedia.org/wiki/Discard_Protocol | |
s.connect(('203.0.113.1', 9)) | |
client = s.getsockname()[0] |
This file contains 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
1. Pick a port and hack up your /etc/services file | |
Change existing port entry from | |
mbus 47000/udp # Message Bus | |
mbus 47000/tcp # Message Bus | |
to.. | |
ssh-47000 47000/udp # Alternate port SSH Remote Login Protocol | |
ssh-47000 47000/tcp # Alternate port SSH Remote Login Protocol |
This file contains 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
echo IzzyBoot for Fusion Drives | |
echo Version 1.0 | |
echo | |
# Are we already encrypted? | |
if diskutil cs list | grep "Encrypted Extents" | grep -q "Yes"; then | |
echo It appears as though this drive is using FileVault2 encryption. This tool is too | |
echo simple to figure out what to do, but maybe you can use Disk Utility to repartition | |
echo the drive or remove the encryption first. | |
echo |
This file contains 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 | |
# | |
# This is a rough Python script that demonstrates running AutoPkg with Jenkins | |
# as only a "check" action, using the ScriptTrigger plugin. It's assumed | |
# that AutoPkg is running directly out of a Git checkout from somewhere, but | |
# this is not necessary. | |
# | |
# Also note that the the '-d' option is given to hardcoded recipe | |
# search directories. | |
# |
This file contains 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 | |
import os | |
import subprocess | |
import urllib | |
import urllib2 | |
import tempfile | |
import json | |
import shutil | |
from time import localtime |
OlderNewer