This guide assumes a fresh install of Mac OSX 10.7 Lion.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[3bot-settings] | |
BOT_ENDPOINT=* | |
PORT = 55556 | |
SECRET_KEY = ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from PIL import Image, ImageDraw | |
def main(): | |
# Open the original image | |
main = Image.open("12voltm.jpg") | |
# Create a new image for the watermark with an alpha layer (RGBA) | |
# the same size as the original image | |
watermark = Image.new("RGBA", main.size) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd $VIRTUAL_ENV/src | |
wget --no-check-certificate https://pypi.python.org/packages/source/p/pytz/pytz-2014.7.zip#md5=04a9558204119ce16af144e987b296e8 | |
unzip pytz-2014.7.zip | |
cd pytz-2014.7/ | |
python setup.py install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# Written in 2013. by Senko Rasic <senko.rasic@dobarkod.hr> | |
# This code is Public Domain. You may use it as you like. | |
__all__ = ['updated'] | |
def updated(dct, *others): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# A Python implementation of the handy `which' shell command, showing | |
# the full path to a command that's in your path. | |
# | |
# Written by: Senko Rasic <senko.rasic@dobarkod.hr> | |
# | |
# Released to Public Domain. Use it as you like. | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import django | |
django.get_version() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import zmq | |
import threading | |
import time | |
from random import choice | |
class ClientTask(threading.Thread): | |
"""ClientTask""" | |
def __init__(self): | |
threading.Thread.__init__ (self) |
Follow the instructions here:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from functools import wraps | |
from django.conf import settings | |
from django.http import HttpResponseRedirect | |
def require_ssl(view): | |
""" | |
Decorator that requires an SSL connection. If the current connection is not SSL, we redirect to the SSL version of | |
the page. |