Skip to content

Instantly share code, notes, and snippets.

View bltravis's full-sized avatar

Brooks Travis bltravis

View GitHub Profile
@bltravis
bltravis / change_manager_import.ipynb
Created March 8, 2024 16:16
change_manager_import.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bltravis
bltravis / customssnfield.py
Created May 30, 2011 17:59
A custom model field to provide transparent encryption/decryption of U.S. Social Security Numbers, using PyCrypto
from Crypto.Cipher import AES
import binascii
import re
ssn_re = re.compile(r"^\d{3}[-\ ]?\d{2}[-\ ]?\d{4}$")
class EncryptedSSNField(models.CharField):
description = _('Adds transparent encryption/decryption (AES256 using pyCrypto) for US Social Security Numbers in the database.')
__metaclass__ = models.SubfieldBase
@bltravis
bltravis / gist:743518
Created December 16, 2010 15:26
Max Daily Tabs
tell application "Google Chrome"
set aWin to window 1
repeat 25 times
tell aWin
set newTab to make new tab
set newTab2 to make new tab
set newTab3 to make new tab
set newTab4 to make new tab
set newTab5 to make new tab
delay 2