Skip to content

Instantly share code, notes, and snippets.

View fuzzylogiq's full-sized avatar

Ben Goodstein fuzzylogiq

View GitHub Profile
@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"
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:
<?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>
$ 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')
@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
#!/bin/bash
/usr/bin/xxd -r -p > ./imgfile.png << EOF
89504e470d0a1a0a0000000d4948445200000200000002000806000000f4
78d4fa00007f314944415478daec9d077c5455f6c703d858ebaa6b5fc4de
d682abebaaeb5fddb5e38a284815900ed211e9bd23bdf7163a8420107a0b
84002109092d942490427a2175322539ff735e26ec183299f7269364caef
fbf9dccff02153de3bf7bcfb3bf7de73eff5f20200000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
#!/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>
#!/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
echo <Netboot Set Name> | perl -e 'while (<>){s/(.)/sprintf("%X:",ord($1))/ge;my $len=length()/3;s/:$//;print "\n Length (hex): ".sprintf("%02X",$len)."\n Name (hex): $_\n";}'
@fuzzylogiq
fuzzylogiq / visualizer.ino
Last active June 14, 2020 15:04
Porting the SparkFun RGB LED Music Sound Visualizer to FastLED (testing sending audio amplitude from Processing via serial)
#include <FastLED.h>
#define DATA_PIN 6
#define COLOR_ORDER GRB
#define CHIPSET WS2812B
#define NUM_LEDS 60
#define HALF_LEDS NUM_LEDS/2
#define VISUALS 6
#define PALETTES 7
#define BRIGHTNESS 255