Skip to content

Instantly share code, notes, and snippets.

View ptb's full-sized avatar

Peter T Bosse II ptb

  • 17:07 (UTC -04:00)
View GitHub Profile
#!/usr/bin/env python
# Based on: http://pastebin.com/ZBq7euid
import email, email.utils, fnmatch, os, re, sys, time
for a, b, c in os.walk("/home/imap-email/store"):
if "tmp" not in a:
for d in fnmatch.filter(c, '[0123456789]*'):
if int(time.time() - (24*60*60)) < os.path.getmtime(os.path.join(a,d)):
e = os.path.join(a, d)
f = email.message_from_file(open(e, "r"))
g = re.sub("\.", "", f.get("Date"))
@ptb
ptb / ptb.txt
Last active August 28, 2015 13:53
Test.
cask :v1 => 'bbedit' do
version '10.5.13'
url "https://s3.amazonaws.com/BBSW-download/BBEdit_#{version}.dmg"
name 'BBEdit'
homepage 'http://www.barebones.com/products/bbedit/'
license :commercial
app 'BBEdit.app'
end
@ptb
ptb / tabs.slim
Last active August 29, 2015 14:07
WIP
---
layout: false
---
sass:
nav[role='tablist']
text-align: center
background-color: #f00
label[role='tab']
font-weight: 300
@ptb
ptb / svg.svg
Created October 17, 2014 10:45
SVG logo in SVG
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ptb
ptb / html5.svg
Created October 16, 2014 15:40
HTML 5 logo in SVG
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ptb
ptb / rails.svg
Created October 16, 2014 15:23
Ruby on Rails logo in SVG
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ptb
ptb / js.svg
Created October 16, 2014 14:16
JavaScript logo in SVG
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ptb
ptb / .gitignore
Created September 19, 2014 11:58
.Trash
.cache
.ccache
.dropbox
.dvdcss
.fontconfig
.zcompdump
Library/Caches
Library/Logs
Library/Saved Application State
@ptb
ptb / gist:b03ac986ab80eec04dba
Created August 21, 2014 19:40
hairline css
background: -webkit-linear-gradient(0, #000 50%, transparent 50%) 0 0 / 1px 100%, -webkit-linear-gradient(90deg, #000 50%, transparent 50%) 0 100% / 100% 1px, -webkit-linear-gradient(180deg, #000 50%, transparent 50%) 100% 0 / 1px 100%, -webkit-linear-gradient(270deg, #000 50%, transparent 50%) 0 0 / 100% 1px
background-repeat: no-repeat