Skip to content

Instantly share code, notes, and snippets.

View arubdesu's full-sized avatar
📛

Allister Banks arubdesu

📛
View GitHub Profile
#!/usr/bin/python
import os
import subprocess
import urllib
import urllib2
import tempfile
import json
import shutil
from time import localtime
@bruienne
bruienne / munki_fuzzinator.py
Created October 9, 2015 19:29
Simple makecatalogs-based script to perform some level of Munki-specific linting on pkginfo files
#!/usr/bin/env python
# encoding: utf-8
#
# Copyright 2014 - The Regents of the University of Michigan.
#
# 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
@trodemaster
trodemaster / alternateSSHPort10.11.txt
Last active October 29, 2015 16:47
Configure OS X 10.11 to listen on an alternate ssh port.
1. Pick a port and hack up your /etc/services file
Change existing port entry from
mbus 47000/udp # Message Bus
mbus 47000/tcp # Message Bus
to..
ssh-47000 47000/udp # Alternate port SSH Remote Login Protocol
ssh-47000 47000/tcp # Alternate port SSH Remote Login Protocol
@timsutton
timsutton / installer_choices_xml.plist
Last active March 6, 2018 03:27
Office 2016 workarounds for MAU and the AU Daemon
<!-- This can be added to a Munki pkginfo so as to deselect the MAU component
from being installed. However, some version of MAU would be probably
already installed if Office 2011 had ever been installed on this system. -->
<key>installer_choices_xml</key>
<array>
<dict>
<key>attributeSetting</key>
<integer>0</integer>
<key>choiceAttribute</key>
<string>selected</string>
@pudquick
pudquick / spotlight_exclusions.py
Last active April 27, 2022 16:47
List and control Spotlight exclusions in OS X via python and pyobjc on OS X 10.11
# Only tested on OSX 10.11.5
import objc
from Foundation import NSBundle
Metadata_bundle = NSBundle.bundleWithIdentifier_('com.apple.Metadata')
functions = [
('_MDCopyExclusionList', b'@'),
('_MDSetExclusion', b'@@I'),
]
@jlehikoinen
jlehikoinen / clean_up_infected_handbrake.sh
Last active May 9, 2017 00:08
Clean up infected HandBrake (1.0.7) for macOS
#!/bin/sh
###
# Clean up infected HandBrake (1.0.7) for macOS
# Note that this script is WIP and does not remove all the traces of the malware
# e.g. reverting /etc/sudoers back to previous state is left out here
# Based on the information posted here:
#!/usr/bin/python3
'''
Display CPU usage for a given process
emoji ref: https://github.com/sheagcraig/Spruce/blob/master/spruce.py
'''
import subprocess
import time
import argparse