Skip to content

Instantly share code, notes, and snippets.

@bruienne
bruienne / cc_channel_parser.py
Created June 20, 2014 20:45
Parse Adobe's channel ID PDF into product plists for aamporter
#!/usr/bin/python
################################################################################
#
# cc_channel_parser.py by Pepijn Bruienne
# Copyright (c) 2014 - The Regents of the University of Michigan
#
# *** Requirements: pdfminer is required to run this tool. ***
# *** Run 'pip install pdfminer' or 'easy_install pdfminer' before use. ***
#
@pmbuko
pmbuko / password_dialog.py
Last active August 29, 2015 14:11
Simple python example of a Pashua password prompt dialog with a checkbox to save the password. Requires Pashua.app and the Pashua.py connector in the same path.
#!/usr/bin/python
#
# Simple python example of a Pashua password prompt window with a checkbox
# for saving the password to the keychain. None of it is wired up to
# actually function. It's just an example of what you can do.
#
# For easiest testing, you should have the Pashua.py connector and Pashua.app
# in the same directory as this script.
#
# The test password is 'password'.
@trodemaster
trodemaster / gist:94ec1f1b24711a050634
Last active August 29, 2015 14:16
tools-rhel6-latest.sh
#!/bin/sh
# Install latest vmware tools from vmware.com repo for rhel 6
# get cert
wget -P /tmp http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-RSA-KEY.pub
# install cert
sudo rpm --import /tmp/VMWARE-PACKAGING-GPG-RSA-KEY.pub
# Setup repo
@nmcspadden
nmcspadden / server_setup.py
Last active November 11, 2015 16:48
Configure OS X Server.app via Python using pexpect
#!/usr/bin/python
import os
import pexpect
import sys
import shutil
import subprocess
def run(cmd):
proc = subprocess.Popen(
@bruienne
bruienne / gist:2b92cbf560522e170aca
Last active October 5, 2016 09:29
Spotlight suggestions profile skeleton
<?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>PayloadContent</key>
<array>
<dict>
<key>PayloadContent</key>
<dict>
<key>com.apple.Spotlight</key>
@bruienne
bruienne / macaduk-oss-docker.txt
Created February 10, 2016 00:45
Mac AD UK 2016 URL-palooza
https://bitbucket.com/bruienne
https://github.com/bruienne
http://enterprisemac.bruienne.com
https://derflounder.wordpress.com/2015/02/04/free-tools-for-the-budget-minded-mac-admin/
https://github.com/autopkg/autopkg
https://github.com/sheagcraig/JSSImporter
https://github.com/tburgin/AbsoluteManageExport
https://github.com/sheagcraig/python-jss
https://github.com/ox-it/manana
https://github.com/nmcspadden/Sal-WHDImport
@MagerValp
MagerValp / PyStrings.py
Created January 23, 2017 09:21
Find non-unicode strings in python 2 source.
#!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
import sys
#!/usr/bin/python
import objc
import plistlib
class attrdict(dict):
__getattr__ = dict.__getitem__
__setattr__ = dict.__setitem__
ServerInformation = attrdict()
@pudquick
pudquick / ProgressDialog.py
Created August 27, 2015 07:35
This is python for a portable, self-contained class called "ProgressDialog" which allows you to create a Cocoa progress indicator dialog for OS X while you do things in a script. Enjoy.
class ProgressDialog(object):
def __init__(self, message, title, use_bar=True):
super(self.__class__, self).__init__()
self.message = message
self.title = title
self.use_bar = use_bar
self.queue = None
self.process = None
def display(self):
# [ begin black magic ]
@opragel
opragel / ea_get_chrome_extensions.py
Last active January 11, 2018 22:38
ea_get_chrome_extensions.py
#!/usr/bin/python
## Script: get_chrome_extensions.py
## Author: Christopher Collins (christophercollins@livenation.com)
# also, owen wuz here. minor corrections (utf-8)
###########################################
##Description: This script searches the last logged in user's installed extensions and submits it to Casper during an inventory report.
###########################################
import os