Skip to content

Instantly share code, notes, and snippets.

@arubdesu
arubdesu / Makefile
Last active August 29, 2015 14:00 — forked from anonymous/makefile-v1
USE_PKGBUILD=1
include /usr/local/share/luggage/luggage.make
TITLE=scriptRunnerPkg
REVERSE_DOMAIN=com.grahamgilbert
PAYLOAD=\
pack-scriptRunner
pack-scriptRunner: l_usr_local_bin
@sudo ${CP} ./scriptRunner.py ${WORK_D}/usr/local/bin/scriptRunner.py
@sudo chmod 755 ${WORK_D}/usr/local/bin/scriptRunner.py
@arubdesu
arubdesu / csvToDS.py
Created May 21, 2014 14:40
Using a csv and a template to generate computer record in DeployStudio, specifically creates users with password 'password'
#!/usr/bin/python
import os
import csv
from Foundation import NSMutableDictionary
top_dict = NSMutableDictionary.dictionary()
# f = open(sys.argv[1], 'rt')
f = open('tehCSV.csv', 'rt')
try:
@arubdesu
arubdesu / ProcessorTemplate.py
Created May 25, 2014 18:38
Autopkg processor template, starting point to fit code into
#!/usr/bin/env python
#
# Copyright 2014 Your Name Here
#
# 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
#
@arubdesu
arubdesu / scLikesDownloader.py
Last active August 29, 2015 14:04
Utility to 1. find your soundcloud UID 2. create a folder for downloads(if not there, ~/Music/SndCldDwnlds) 3. look through the past 50 likes for your user to find download url's and 4. download 'em. Requires soundcloud module, installable via pip
#!/usr/bin/env python
# This tool checks your last 50 likes for downloadable files,
# then puts them in your Music folder, which it will check
# against on subsequent fetches.
import soundcloud, os, sys, urllib2, re
# Create this by making an app on the Soundcloud dev site
my_api_id = "xxxxxxxxxxxxxxxxxxxxxxx"
# you should know this...
@arubdesu
arubdesu / gist:58d56c120d93f569b6d6
Created October 8, 2014 18:10
selling PE to security team
Even with the JAMF suite available, our remote management tools have not enabled efficiently taking inventory over the WAN or implementing an optimized patch management system. It also is used primarily on client workstations for just Macs, with the breadth of what Apple mostly covers when it comes to provided support, instead of fine-grained customization and server-grade functionality.
Puppet adds not only its core competency as a configuration management tool, which allows in-depth but hands-off auditing, but also, over the maturation of the Puppet Enterprise product, it's added a WAN-optimized orchestration tool. This mix of 'client checks in' and 'ad-hoc, on-demand, over-the-WAN execution’ makes it the leader in its space. We also would be able to leverage its certificate authority, which has been utilized in many environments to secure communication of the Managed Software Center tool which provides the most efficient 'self-service' model of patch management for Macs. The AIX/UNIX/Linux and SCCM teams
@arubdesu
arubdesu / his.plist
Last active August 29, 2015 14:07
why can't they just make their software work.pleaserun
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version='1.0'>
<dict>
<key>Label</key>
<string>com.ittvis.lmgrd</string>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
#!/bin/bash
set -x
defaults="/usr/bin/defaults"
touch="/usr/bin/touch"
$defaults write "/Volumes/$DS_LAST_SELECTED_TARGET/Library/Preferences/ManagedInstalls" InstallAppleSoftwareUpdates -bool true
$touch "/Volumes/$DS_LAST_SELECTED_TARGET/Users/Shared/.com.googlecode.munki.checkandinstallatstartup"
exit 0
@arubdesu
arubdesu / Notes.txt
Last active August 29, 2015 14:08
Notes from the Tim Sutton and Graham Gilbert's deployment session
We started by discussing what's new in Yosemite:
Puppet as a tool is unaffected, due to getting over the issues with Rubby 2.0 in Mavericks.
The issues with NetInstall and CreateOSXInstallPkg with the distribution pkg format were discussed, as per:
https://github.com/munki/createOSXinstallPkg#further-note-on-additional-packages-and-yosemite
SCCM hasn't been well know to immediately support OS releases, nor patch broken functionality in a timely fashion.
Re: looking to migrate a DeployStudio repo to a new address but reuse nbi's of older version of the OS was given the option of mounting them as they are read/write, and can therefore be updated for new server location. Another point is you can provide auth to automatically run workflows at the NBI level, which is super cool for lab re-imaging.
@arubdesu
arubdesu / CodeSignatureVerifier-Overridable
Last active August 29, 2015 14:09
Clumsily allowing no-op key to allow skipping of verification if recipe author wouldn't appreciate possible added support load, or otherwise continuing with previous behavior
#!/usr/bin/python
#
# Copyright 2014 Hannes Juutilainen
#
# 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
#
@arubdesu
arubdesu / Git-Fat_draft.txt
Last active August 29, 2015 14:10
afp548 draft on git-fat, part one - intro
Do you work on munki with a team of folks (meaning more than one)? You probably wish you could use MunkiAdmin for everything, but the server world is turning *nix, and MunkiAdmin is only meant to be super-efficient running on your Mac (whereas mounting the munki repo over the network may be a poor experience as things grow very large). It's sheer luck that Hannes Juutilainen wants to help with all of our workflow needs, so he composed the original page on git usage for the official munki wiki. Git was made for a distributed, (latent) network-aware world, but as the wiki page takes into account by instructing you to create a .gitignore file, it wasn't made to shuttle around large, compressed containers like DMGs and pkgs. If you're pushing 1GB+ disk images with git as the transport mechanism, with every version copied to it's internal storage... <'you're going to have a bad time' South Park meme goes here>
Let's take a step back. In an idealized view of things, you could 1. check out the current version of th