Skip to content

Instantly share code, notes, and snippets.

View nmcspadden's full-sized avatar

Nick McSpadden nmcspadden

View GitHub Profile
#!/usr/bin/python
import csv
import os
MUNKI_REPO = "/Users/Shared/munki/manifests"
with open('serials.csv', mode='r') as infile:
reader = csv.reader(infile)
keyDict = dict(reader)
<dict>
<key>name</key>
<string>Attempted Formatting</string>
<key>description</key>
<string>This will break everything you&apos;ve ever loved</string>
<key>restart_action</key>
<string>none</string>
<key>bless_target</key>
<false/>
<key>components</key>
<?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>password</key>
<string></string>
<key>workflows</key>
<array>
</array>
</dict>
#!/usr/bin/python
import subprocess
import sys
printerName = "PRINTERNAME"
printerOptions = { "HPOption_Duplexer":"False",
"HPOption_500_Sheet_Feeder_Tray3":"False" }
# Only lpoptions needs to be checked - if the printer doesn't exist, lpoptions will fail anyway.
cmd = ['/usr/bin/lpoptions', '-p', printerName, '-l']
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
<?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.sacredsf.profile.chrome</string>
<key>PayloadRemovalDisallowed</key>
<true/>
<key>PayloadScope</key>
<string>System</string>
<Connector port="@@@WEBHELPDESK_SSL_PORT@@@" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslEnabledProtocols="TLSv1, TLSv1.1, TLSv1.2" sslProtocol="TLS"
keystoreFile="@@@WEBHELPDESK_KEYSTORE@@@"
keystorePass="@@@WEBHELPDESK_KEYSTORE_PASS@@@"
keystoreType="@@@WEBHELPDESK_KEYSTORE_TYPE@@@"
@@@WEBHELPDESK_ADDRESS@@@
compression="on"
compressionMinSize="2048"
noCompressionUserAgents="gozilla, traviata"
E [20/May/2015:14:53:16 -0700] [Job 41543] Stopping unresponsive job.
E [26/May/2015:09:08:50 -0700] [Job 42081] Unable to add document to print job.
E [26/May/2015:09:13:50 -0700] [Job 42081] Stopping unresponsive job.
E [26/May/2015:12:36:30 -0700] [Job 42398] Aborting job because it has no files.
E [26/May/2015:12:41:18 -0700] [Job 42401] Job stopped due to filter errors; please consult the error_log file for details.
D [26/May/2015:12:41:18 -0700] [Job 42401] The following messages were recorded from 12:41:15 to 12:41:18
D [26/May/2015:12:41:18 -0700] [Job 42401] Adding start banner page "none".
D [26/May/2015:12:41:18 -0700] [Job 42401] Queued on "Xerox_Broadway_FollowMe_Printing" by "kelsey.bartz".
D [26/May/2015:12:41:18 -0700] [Job 42401] File of type application/vnd.cups-postscript queued by "kelsey.bartz".
D [26/May/2015:12:41:18 -0700] [Job 42401] Adding end banner page "none".
<?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>com.apple.mdm.VMServer.local.d5fbeccd-8863-4b72-941f-b5a4c62859b5.alacarte</string>
<key>PayloadRemovalDisallowed</key>
<true/>
<key>PayloadScope</key>
<string>User</string>

Keybase proof

I hereby claim:

  • I am nmcspadden on github.
  • I am nmcspadden (https://keybase.io/nmcspadden) on keybase.
  • I have a public key whose fingerprint is DE51 C8E7 3010 61C2 1C8C 1C67 E2C6 B222 390F 9606

To claim this, I am signing this object:

#!/bin/sh
# preinstall
#
# Make sure that /Library exists. Bail if it does not.
# Also, make sure that Vertica driver can be found. Give error and quit if it can't.
# This runs as a pre-install step by the Vertica configuration installer
#
# Does /Library exist?