Skip to content

Instantly share code, notes, and snippets.

@zdw
zdw / gist:8bf32d2a5c94e954425b
Created May 19, 2014 16:13
Backup vendor generic repsonse
Hi $VENDOR,
I support a mix of Windows, OS X, and Unix clients, and as such, require that all solutions I promote support be multi-platform.
As OS X usually tends to be the most difficult to support properly, please provide results of your product completing this metadata integrity test suite:
https://github.com/n8gray/Backup-Bouncer
Once you (or someone technical in your organization) has done this, email me the results.
@zdw
zdw / osx_auto.md
Created March 17, 2014 16:53
A list of tools to automate installation of software or configuration of OS X
@zdw
zdw / main.yml
Created February 18, 2014 01:02
ansible example of dicts and with_items
- name: allow http traffic through firewall
lineinfile: dest=/etc/sysconfig/iptables
regexp="^-A INPUT -p {{item.protocol}} -m {{item.protocol}} --dport {{item.port}} -j ACCEPT$"
line="-A INPUT -p {{item.protocol}} -m {{item.protocol}} --dport {{item.port}} -j ACCEPT"
insertafter="^-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT$"
with_items:
- { protocol: tcp, port: 80 }
notify:
- restart iptables
Common Mac Admin tools requirements
===================================
Requires OS X Server
--------------------
DeployStudio (for NetBoot/OD integration)
Requires OS X, and same version as being deployed
@zdw
zdw / gist:7295363
Created November 3, 2013 22:00
for pam
import math
p = [5,10]
q = [9,12]
print math.sqrt((p[0] - q[0])**2+(p[1] - q[1])**2)
@zdw
zdw / gist:6194031
Created August 9, 2013 14:29
example deploystudio finisher script with certs.
#!/bin/sh
echo "ds_finish.sh - v0.1 ("`date`")"
# Set the munki server URL
defaults write /Library/Preferences/ManagedInstalls SoftwareRepoURL "https://munki.production.example.com/"
# Set the Munki ClientIdentifier to be the hostname of this computer
defaults write /Library/Preferences/ManagedInstalls ClientIdentifier "${DS_HOSTNAME}"
# SaferScanner is just like re.Scanner, but it neuters any grouping in the lexicon
# regular expressions and throws an error on group references, named groups, or
# regex in-pattern flags. Any of those can break correct operation of Scanner.
import re
from sre_constants import BRANCH, SUBPATTERN, GROUPREF, GROUPREF_IGNORE, GROUPREF_EXISTS
class SaferScanner(re.Scanner):
def __init__(self, lexicon, flags=0):
self.lexicon = lexicon
@zdw
zdw / .slate
Created April 10, 2013 14:45
Example .slate config file for https://github.com/jigish/slate
# Config
config windowHintsFontSize 100
config windowHintsIgnoreHiddenWindows false
config windowHintsShowIcons true
config windowHintsSpread true
#config windowHintsTopLeftX (windowSizeX/2)-(windowHintsWidth/2)
#config windowHintsTopLeftY (windowSizeY/2)-(windowHintsHeight/2)
config nudgePercentOf screenSize
config resizePercentOf screenSize
@zdw
zdw / Kerio Connect Install on CentOS 6
Created April 3, 2013 19:56
Basic outline for installing Kerio Connect on CentOS 6
Kerio Connect on CentOS 6
-------------------------
1. Start installer, install Basic Server edition of CentOS 6.
Kerio Connect stores itself and data by default in /opt, so make that large enough for your purposes.
2. After first boot, update the OS
@zdw
zdw / 10.8_vanilla.catalog
Last active December 14, 2015 23:39
InstaDMG 10.8_vanilla.catalog for 10.8.3. Tested/works on real hardware.
# $Rev$ from $Date$
# Catalog assumes your InstallESD is at the lastest build available on the Mac App Store. If you are on an older build, uncomment the combo updater.
Installer Disc Builds: 12A269, 12B19, 12C60, 12D78
Output Volume Name: Macintosh HD
Output File Name: 10.8_vanilla
OS Updates: