Skip to content

Instantly share code, notes, and snippets.

View clburlison's full-sized avatar

Clayton Burlison clburlison

View GitHub Profile
@gregneagle
gregneagle / gist:9c684ed9366bc12091da
Last active December 5, 2024 10:42
Notes on getting Project iMAS MDM Server running under virtualenv on OS X
See https://github.com/project-imas/mdm-server#setup for starting point.
Assuming you have virtualenv installed....
bash-3.2$ virtualenv mdm-server-env
New python executable in mdm-server-env/bin/python
Installing setuptools, pip...cd mdone.
bash-3.2$ cd mdm-server-env/
bash-3.2$ source bin/activate
(mdm-server-env)bash-3.2$ easy_install web.py
@pudquick
pudquick / osx_backdrop.py
Last active September 30, 2016 13:56
Python to show an image centered on a black background as your OS X desktop while other python code can run
#!/usr/bin/python
# Put a background in the same directory as this .py file and name it
backdrop_filename = "backdrop.jpg"
# http://wallreborn.com/wp-content/uploads/2015/05/cool-desktop-backgrounds-8-Cool-Wallpaper.jpg
# is a pretty sweet example to try with
# Then run this script from the Terminal :)
@lamw
lamw / gist:487c9ecb2dc7d043eec8
Last active October 30, 2022 06:21
Automate silent installation of VMware Tools for Mac OS X
#!/bin/bash
# 1 = VMware Tools ISO is mounted from vSphere
# 2 = Download VMware Tools (assumes you can connect to internet)
INSTALL_METHOD=2
# Thanks to Rich Trouton for tip on Tools being available online
VMWARE_TOOLS_DOWNLOAD_URL=http://softwareupdate.vmware.com/cds/vmw-desktop/fusion/7.1.2/2779224/packages/com.vmware.fusion.tools.darwin.zip.tar
# DO NOT MODIFY BEYOND HERE #
from flask import Flask, request
app = Flask(__name__)
@app.route('/', methods=['POST'])
def get_post_data():
if request.method == 'POST':
data = request.values
print "%s: %s: %s" % (data['serial'], data['status'], data['message'])
return ""
Hello <sales person>!
Judging by the "To:" field, you are using a commercial marketing database to contact me. The reason that I can tell that you are using a database is that it's not actually an email address I (or anyone I actually know on a first-name base) use. It seems to have been clumsily stitched together using first and last name records and the domain of my employer. Fairly sloppy work in my opinion and I hope such a database didn't cost you too much. I hate it when people try to take shortcuts.
This brings us to the overly familiar greeting in your message which further suggest there's some miscommunication here. We don't actually know each other, nor have we ever spoken before.
Having established both the "Unsolicited" and "Commercial" nature of your message I think we can agree that it qualifies as UCE. As such you should probably have included an opt-out link as required by CAN-SPAM. You provided a link to easily schedule a call but sadly no opt-out link. I understand, it's easy to overlook
@pudquick
pudquick / reorder_wifi.py
Last active July 16, 2022 01:03
This python code uses Objective-C calls to reorder pre-existing SSIDs in your WiFi interfaces to place a preferred SSID at the top (without removing / re-adding)
#!/usr/bin/python
# As written, this requires the following:
# - OS X 10.6+ (may not work in 10.10, haven't tested)
# - python 2.6 or 2.7 (for collections.namedtuple usage, should be fine as default python in 10.6 is 2.6)
# - pyObjC (as such, recommended to be used with native OS X python install)
# Only tested and confirmed to work against 10.9.5
# Run with root
@MiqViq
MiqViq / reposado_auto_munkiimport_aswupd_configdata_items.sh
Last active May 15, 2017 20:45
For Munki: automatically create apple_update_metadata pkginfo files for XProtectPlistConfigData, Gatekeeper Configuration Data
#!/bin/bash
# reposado_auto_munkiimport_aswupd_configdata_items
#
# automatically create apple_update_metadata pkginfo files for Munki: XProtectPlistConfigData, Gatekeeper Configuration Data
#
# path to your Munki repo (local or mounted share)
munkiRepoDir="/Users/Shared/munki/repo"
@pudquick
pudquick / beamsync.py
Last active September 28, 2023 15:16
#!/usr/bin/python
import ctypes, ctypes.util
# Import CoreGraphics as a C library, so we can call some private functions
c_CoreGraphics = ctypes.CDLL(ctypes.util.find_library('CoreGraphics'))
def disable_beam_sync(doDisable):
if doDisable:
# Disabling beam sync:
# 1st: Enable Quartz debug
@bochoven
bochoven / munki_rebrand.py
Last active October 19, 2016 10:43
Rebrand Munki 2 with a custom name and custom icon
#!/usr/bin/python
# encoding: utf-8
#
# Arjen van Bochoven Oct 2014
# Script to rebrand/customize Managed Software Center
#
# Prerequisites: You need Xcode (5/6) installed
# For Xcode 6 you need to add the 10.8 SDK
# See: https://github.com/munki/munki/wiki/Building%20Munki2%20Pkgs
#
@chilcote
chilcote / gist:f5af1a788ac4a2e4d5df
Created September 2, 2014 03:49
python script to set dns servers and search domains in os x
#!/usr/bin/env python
'''
This script sets dns servers and search domains for all
Ethernet adapters and Wi-fi interfaces.
Requirements
------------
+ OS X 10.9.x
+ python 2.7