Skip to content

Instantly share code, notes, and snippets.

View clburlison's full-sized avatar

Clayton Burlison clburlison

View GitHub Profile
@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 / 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 / GPG and git on macOS.md
Created July 28, 2016 13:25 — forked from danieleggert/GPG and git on macOS.md
How to set up git to use the GPG Suite

GPG and git on macOS

Setup

No need for homebrew or anything like that. Works with https://www.git-tower.com and the command line.

  1. Install https://gpgtools.org -- I'd suggest to do a customized install and deselect GPGMail.
  2. Create or import a key -- see below for https://keybase.io
  3. Run gpg --list-secret-keys and look for sec, use the key ID for the next step
  4. Configure git to use GPG -- replace the key with the one from gpg --list-secret-keys

What Changed

I used to automount on OSX by sudo vifs and adding a line like vault.local:/backup /Volumes/backup url auto,url==afp://;AUTH=No%20User%20Authent@vault.local/backup 0 0. But that no longer works on Maverick because the system deletes everything in /Volumes on wake/restart/something-or-other.

Fix with ControlPlane

Use this

The Fix Under-the-Hood