Skip to content

Instantly share code, notes, and snippets.

Avatar

Nick McSpadden nmcspadden

View GitHub Profile
@nmcspadden
nmcspadden / server_setup.py
Last active Nov 11, 2015
Configure OS X Server.app via Python using pexpect
View server_setup.py
#!/usr/bin/python
import os
import pexpect
import sys
import shutil
import subprocess
def run(cmd):
proc = subprocess.Popen(
View code.rb
ruby_block 'Server.app' do
block do
require 'open3'
require 'expect'
# start the servercmd with IO pipes to its input and from its out&error combined
cmd_in, cmd_out_err, thr = Open3.popen2e(servercmd, "setup")
# Here's where you use the minimal ruby expect library
cmd_out_err.expect 'Press Return to view the software license agreement.'
cmd_in.puts ''
View LZMADecompressor.py
#!/usr/bin/python
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
View msoffice2016_autoupdate.sh
#!/bin/bash
# Credit to Erik Gomez, 2015, for this script.
if [ -e "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app" ]
then
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -R -f -trusted "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app"
fi
if [ -e "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/Microsoft AU Daemon.app" ]
then
View preinstall.sh
#!/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?
View keybase.md

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:

View gist:8e43047fa219f74a9f6b
<?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>
View gist:8e09671bd5e9dbe694ba
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".
View These are bad ciphers and you should feel bad
<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"
View gist:67abea3f550af2c30ee6
<?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>
You can’t perform that action at this time.