Skip to content

Instantly share code, notes, and snippets.

View jessepeterson's full-sized avatar

Jesse Peterson jessepeterson

View GitHub Profile
@jessepeterson
jessepeterson / convert-emlx.py
Last active December 15, 2015 01:29
Convert an Apple emlx file to a .eml file (removing the Apple-proprietary parts; leaving a raw message file)
import sys
for i in sys.argv[1:]:
if i.lower().endswith('emlx'):
print 'Processing:', i
else:
print 'Unknown file:', i
sys.exit(1)
emlx = open(i, 'r')
@jessepeterson
jessepeterson / newsyslog-provider.rb
Created September 20, 2011 23:43
Newsyslog config file Puppet type
require 'puppet/provider/parsedfile'
newsyslog = '/etc/newsyslog.conf'
Puppet::Type.type(:newsyslog).provide(
:parsed,
:parent => Puppet::Provider::ParsedFile,
:default_target => newsyslog,
:filetype => :flat) do