Skip to content

Instantly share code, notes, and snippets.

View twexler's full-sized avatar
💁‍♂️
Breakin' stuff.

Ted Wexler twexler

💁‍♂️
Breakin' stuff.
View GitHub Profile
#!/usr/bin/python
from __future__ import with_statement
import os,stat, pickle
class PyCache:
file = "/tmp/pycache.tmp"
def __init__(self): pass
def retrieve(self):
try:
st = os.stat(self.file)
curtime = time.time()
@twexler
twexler / gist:981377
Created May 19, 2011 18:13
Favorite piece of code
def quote_argument(argument):
failure = ('\\', '"', '$', '`', ';')
for fail in failure:
if(argument.find(fail) != -1):
os._exit(255)
return argument