I hereby claim:
- I am jdowner on github.
- I am jdowner (https://keybase.io/jdowner) on keybase.
- I have a public key whose fingerprint is 5CBD 453C 443E 82E6 6E4D 72DE 72D0 D9D9 8165 C99D
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
set -o pipefail | |
CHROOT_PATH="${HOME}/scm/chroot" | |
SRC_PATH="${HOME}/scm/rift" | |
die() { | |
echo | |
echo "ERROR: $*" |
"""Disk And Execution MONitor (Daemon) | |
Configurable daemon behaviors: | |
1.) The current working directory set to the "/" directory. | |
2.) The current file creation mode mask set to 0. | |
3.) Close all open files (1024). | |
4.) Redirect standard I/O streams to "/dev/null". | |
A failed call to fork() now raises an exception. |
#!/usr/bin/env python | |
import email.mime.text | |
import smtplib | |
username = '[email protected]' | |
password = '****************' | |
hostname = 'outlook.office365.com' | |
msg = email.mime.text.MIMEText('test') |
import re | |
class Regex(object): | |
""" | |
This is a convenience class for wrapping a regular expression, naming the | |
groups in the expression, and retrieving a named tuple as the result of a | |
match. For example, | |
>>> regex = Regex('filename: (\S*)', 'filename') | |
>>> regex.match('filename: my-file.txt') |
import collections | |
import os | |
import subprocess | |
class Entry(collections.namedtuple('Entry', 'username, password, url')): | |
""" | |
An Entry object represents an entry in the password store. | |
""" | |
def __new__(cls, username, password, url=None): | |
"""Create a new Entry object |
def blocks(iterable, n): | |
"""Create a generator that returns blocks of values | |
This generator yields lists of values from the iterable that contain 'n' | |
elements (except, possible, for the last block if the length of the iterable | |
is not divisible by 'n'). | |
Arguments: | |
iterable: an interable object like a list or generator | |
n: a positive integer |
#!/usr/bin/env python2 | |
import argparse | |
import sys | |
import sqlalchemy | |
import yaml | |
def sqlite2yaml(filename): |
#!/usr/bin/env python3 | |
""" | |
The MIT License (MIT) | |
Copyright (c) 2016 Joshua Downer | |
Permission is hereby granted, free of charge, to any person obtaining a copy of | |
this software and associated documentation files (the "Software"), to deal in | |
the Software without restriction, including without limitation the rights to |
import functools | |
import weakref | |
class Property(object): | |
instances = weakref.WeakValueDictionary() | |
def __new__(cls, name): | |
if name in Property.instances: | |
return Property.instances[name] |