Skip to content

Instantly share code, notes, and snippets.

View mattprecious's full-sized avatar
Why is this a thing

Matthew Precious mattprecious

Why is this a thing
View GitHub Profile

Keybase proof

I hereby claim:

  • I am mattprecious on github.
  • I am mattprecious ( on keybase.
  • I have a public key ASCmyN9F2j0UwMNzaPKKAkdfYe80fFEPR0jRKm-h2J1kNwo

To claim this, I am signing this object:

mattprecious /
Created November 18, 2015 03:18
Generate a P90X3 schedule in iCalendar format.
import argparse, datetime
def date(s):
return datetime.datetime.strptime(s, "%Y-%m-%d")
except ValueError:
raise argparse.ArgumentTypeError("Not a valid date: '{0}'. Date must be in format 'YYYY-MM-DD'".format(s))
mattprecious /
Created October 7, 2015 20:11
Rename iOS asset drops to match Android conventions. Deisgners, AMIRITE!?
import sys, re
def convert(s):
s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', s)
return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
if __name__ == '__main__':
if len(sys.argv) == 1: