Skip to content

Instantly share code, notes, and snippets.

View clburlison's full-sized avatar

Clayton Burlison clburlison

View GitHub Profile
@clburlison
clburlison / reverseGeo.py
Created September 16, 2016 21:23
Using CoreLocation GeoCoder in PyObjC
#!/usr/bin/python
from CoreLocation import CLLocation
from CoreLocation import CLGeocoder
from Foundation import NSLog, NSRunLoop, NSDate
location = CLLocation.alloc().initWithLatitude_longitude_(37.331762, -122.030561)
address = "1 Infinite Loop, Cupertino, CA 95014"
def myCompletionHandler(placemarks, error):
@clburlison
clburlison / args.py
Last active September 23, 2016 20:27 — forked from olooney/.gitignore
worked examples of argparse and python logging
#! /usr/bin/env python
"""Sample Code Demonstrating argparse and logging
Demonstrates appropriate logging techniques for a trivial command line program
that supports a variety of "verbosity" flags.
"""
import argparse
import logging
import logging.handlers
@clburlison
clburlison / pip_pkgs_update.sh
Last active October 11, 2016 21:17
Update pip packages
# from https://www.reddit.com/r/Python/comments/31viu3/why_pip_doesnt_have_a_command_to_upgrade_all/cq5efx9
pip list --outdated | cut -d ' ' -f1 | cut -d = -f1 | xargs -n1 pip install -U
@clburlison
clburlison / mwa2_ubuntu16.md
Last active February 28, 2018 19:36
A dirty mwa2 ubuntu 16 guide.

A dirty guide to setup MWA2 on Ubuntu 16. I want to convert this into a blog just haven't found the time.

Go full yolo sudo su

Install packages apt-get install git nginx python-pip python-dev

Let's create our mwa2 web config (no ssl so it's easier & using root because yolo)

@clburlison
clburlison / update_CFBundleVersion_Xcode.sh
Created February 15, 2017 21:02
Update the CFBundleVersion based off of your git commits.
# based on http://tgoode.com/2014/06/05/sensible-way-increment-bundle-version-cfbundleversion-xcode
if git rev-parse --is-inside-work-tree 2> /dev/null > /dev/null; then
echo "Setting CFBundleVersion to Git rev-list --count"
build_number=$(git rev-list HEAD --count)
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $build_number" "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}"
else
echo "Not in a Git repo, not setting CFBundleVersion"
fi
@clburlison
clburlison / 10.12.3_10.12.4_launchd.rootless.diff
Created April 5, 2017 00:21
A diff of the xpc.launchd.rootless file from macOS 10.12.3 to 10.12.4
--- 10.12.3_16D32/com.apple.xpc.launchd.rootless.plist 2017-04-04 19:17:25.000000000 -0500
+++ 10.12.4_16E195/com.apple.xpc.launchd.rootless.plist 2017-04-04 19:05:56.000000000 -0500
@@ -4,36 +4,13 @@
<dict>
<key>RemovableServices</key>
<dict>
- <!-- Daemons -->
<key>com.apple.AEServer</key>
<true/>
<key>com.apple.AppleFileServer</key>
@clburlison
clburlison / keybase.md
Created June 6, 2017 03:24
keybase.md

Keybase proof

I hereby claim:

  • I am clburlison on github.
  • I am clburlison (https://keybase.io/clburlison) on keybase.
  • I have a public key ASAvgF1uXQVY5f5DtUWmG44s_7jHF8RFD5b7mqxqrKwvbgo

To claim this, I am signing this object:

@clburlison
clburlison / fancy_defaults_read.py
Created July 19, 2017 17:09 — forked from gregneagle/fancy_defaults_read.py
fancy_defaults_read.py: Reads a preference, prints its value, type, and where it is defined.
#!/usr/bin/python
import os
import sys
from CoreFoundation import (CFPreferencesAppValueIsForced,
CFPreferencesCopyAppValue,
CFPreferencesCopyValue,
kCFPreferencesAnyUser,
kCFPreferencesAnyHost,
@clburlison
clburlison / xcode_results_9.2.txt
Created February 19, 2018 17:39
Xcode 9.2 AutoPkg Results
Last login: Thu Feb 8 12:56:50 on ttys001
vagrant-17D47:~ vagrant$ autopkg
-bash: autopkg: command not found
vagrant-17D47:~ vagrant$ sudo installer -pkg /Users/vagrant/Downloads/autopkg-1.0.3.pkg -tgt /
installer: Package name is autopkg-1.0.3
installer: Installing at base path /
installer: The install was successful.
vagrant-17D47:~ vagrant$ autopkg repo-add https://github.com/facebook/Recipes-for-AutoPkg.git
Attempting git clone...
@clburlison
clburlison / vbox_verification.txt
Created March 15, 2018 06:03
ohai/pull/1164 - vbox & vmware
Last login: Wed Mar 14 22:54:07 on ttys000
vagrants-MacBook-Pro:embedded vagrant$ ohai hardware
[2018-03-14T22:54:39-07:00] INFO: The plugin path /etc/chef/ohai/plugins does not exist. Skipping...
{
"SMC_version_system": "2.3f35",
"apple_rom_info": "vboxVer_5.2.8vboxRev_121009",
"boot_rom_version": "VirtualBox",
"current_processor_speed": "2.71 GHz",
"l2_cache_core": "256 KB",
"l3_cache": "16 MB",