Skip to content

Instantly share code, notes, and snippets.

View wetstevs's full-sized avatar

Steve Schreiber wetstevs

View GitHub Profile
@wetstevs
wetstevs / countdown.py
Last active December 15, 2015 05:59
A Countdown to Freedom!
#!/usr/bin/python
import datetime
import argparse
import sys
wha = -1
parser = argparse.ArgumentParser(description="Countdown to Freedom")
group = parser.add_mutually_exclusive_group()
@wetstevs
wetstevs / gist:3662058
Created September 7, 2012 00:52
Copy Movie Files
while read file;
do echo "$file";
BIRTH=$(stat -f %B "$file");
FMT=$(date -j -r $BIRTH "+%Y%m%d%H%M.%S");
FN=$(basename "$file");
cp "$file" "/Users/wetstevs/Desktop/bkup2/$BIRTH.$FN";
touch -mt $FMT "/Users/wetstevs/Desktop/bkup2/$BIRTH.$FN";
done < ~/Desktop/movies.txt
@wetstevs
wetstevs / orionpgmurl.py
Created August 15, 2012 16:17
Generate TSS Approval URL
#!/Library/Frameworks/Python.framework/Versions/2.7/bin/python
import subprocess
import datetime
# get last week's sunday and saturday dates & URL encode
# get today (day of week) & figure out distance to get to -1 and 5
# those plus -7 should get you the two dates (sun/sat prior)
today = datetime.date.today()
todayDay = today.weekday()