Skip to content

Instantly share code, notes, and snippets.

@zdw
zdw / rolling_passwords.md
Created May 1, 2012 21:17
Rolling passwords
@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:
@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 / .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
# 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 / 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}"
@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)
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 / 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
@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