Skip to content

Instantly share code, notes, and snippets.

View fuzzylogiq's full-sized avatar

Ben Goodstein fuzzylogiq

View GitHub Profile
#!/usr/bin/python
# encoding: utf-8
"""
lightify.py
!!description goes here!!
Copyright (c) Ben Goodstein 2016
This program is free software: you can redistribute it and/or modify
#!/usr/bin/python
# encoding: utf-8
"""
recipe_tester.py
Module for testing autopkg recipes
Copyright (C) University of Oxford 2016
Ben Goodstein <ben.goodstein at it.ox.ac.uk>
#!/bin/bash
/usr/bin/xxd -r -p > ./imgfile.png << EOF
89504e470d0a1a0a0000000d4948445200000200000002000806000000f4
78d4fa00007f314944415478daec9d077c5455f6c703d858ebaa6b5fc4de
d682abebaaeb5fddb5e38a284815900ed211e9bd23bdf7163a8420107a0b
84002109092d942490427a2175322539ff735e26ec183299f7269364caef
fbf9dccff02153de3bf7bcfb3bf7de73eff5f20200000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
@fuzzylogiq
fuzzylogiq / doNotUpdateSpotify.sh
Created October 19, 2016 11:54 — forked from AllanLRH/doNotUpdateSpotify.sh
Disable Spotify autoupdate on Mac OS X (testet on Yosemite).
# This script prevents Spotifys Autoupdating on OS X (testet on Yosemite)
# Based on this tutorial:
# http://supraliminal.net/blog/2013/4/21/how-to-revert-back-to-the-older-better-spotify-client
#
# This script must be run as root:
# sudo sh doNotUpdateSpotify.sh
#
FILE="/tmp/out.$$"
if [ "$(id -u)" != "0" ]; then
$ munkiimport ~/Downloads/Firefox\ 52.0.dmg
Traceback (most recent call last):
File "/usr/local/munki/munkiimport", line 1077, in <module>
main()
File "/usr/local/munki/munkiimport", line 867, in main
matchingpkginfo = find_matching_pkginfo(repo, pkginfo)
File "/usr/local/munki/munkiimport", line 508, in find_matching_pkginfo
catdb = make_catalog_db(repo)
File "/usr/local/munki/munkiimport", line 404, in make_catalog_db
plist = repo.get('catalogs/all')
<?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>RestartAction</key>
<string>RequireRestart</string>
<key>_metadata</key>
<dict>
<key>created_by</key>
<string>ouit0354</string>
sites = j.Site()
computers = j.Computer()
computers2 = computers.retrieve_all(subset='general')
mobiledevices = j.MobileDevice()
mobiledevices2 = mobiledevices.retrieve_all(subset='general')
computer_sites = [ computer.find('general/site/id').text for computer in computers2 if computer.find('general/remote_management/managed').text == 'true' ]
mobile_sites = [ mobile.find('general/site/id').text for mobile in mobiledevices2 if mobile.find('general/managed').text == 'true' ]
for site in sites:
@fuzzylogiq
fuzzylogiq / installer_vers
Last active July 27, 2017 13:01
Gets ProductVersion and BuildVersion from an OS X/macOS Installer App
#!/bin/bash
APP="${1}"
if [ -z "${APP}" ]; then
echo "Usage: $(basename ${0}) INSTALL_APP"
exit 1
fi
tmp_dir=$(/usr/bin/mktemp -d)
ESD_DIR="${tmp_dir}/esd"
@fuzzylogiq
fuzzylogiq / diff_os.py
Last active April 8, 2020 03:22
Shows the differences in paths installed by two different OS X/macOS installers, with optional path(s) to restrict search to
#!/usr/bin/python
# encoding: utf-8
'''
diff_os.py
Shows the differences in file paths installed by two macOS installer apps or esds
Copyright (C) Ben Goodstein 2017
This program is free software: you can redistribute it and/or modify
#!/bin/bash
#
# FileVaultSetup.sh
#
# Copyright (c) University of Oxford 2017
# Ben Goodstein <ben.goodstein(at)it.ox.ac.uk>
#
# This script is designed to switch on deferred FileVault enablement for the
# currently logged in user, provided they are not one of our known
# admin accounts (to ensure the end user can unlock the disk). It first