Skip to content

Instantly share code, notes, and snippets.

View atelenga's full-sized avatar

Alexander Telenga atelenga

View GitHub Profile
from django.utils.deconstruct import deconstructible
@deconstructible
class PathAndRename(object):
def __init__(self, sub_path):
self.path = sub_path
def __call__(self, instance, filename, prefix=None, unique=False):
"""
@atelenga
atelenga / bulk_ip_whois.py
Created December 24, 2015 06:56
Simple script for bulk IP whois lookup
### Install DMitry pacakge before use
### sudo apt-get install dmitry
###
import sys, subprocess
if __name__ == "__main__":
if len(sys.argv) != 2:
print "usage: %s <file with IP list>" % sys.argv[0]
sys.exit(1)