This file contains hidden or 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 | |
""" | |
Create a button | |
""" | |
import sys, cairo, cairo_helpers | |
def roundedrec(context,x,y,w,h,r = 10): | |
"Draw a rounded rectangle" |
This file contains hidden or 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 __future__ import with_statement | |
from fabric.api import env, run, settings, hide | |
from fabric.decorators import hosts, runs_once | |
venv = "/home/websites/.virtualenvs/twtv3/" | |
env.user = 'webdev' | |
env.hosts = [ | |
'192.168.1.10', | |
'192.168.1.11', |
This file contains hidden or 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 | |
""" | |
Use pip to get a list of local packages to check against one or more package | |
indexes for updated versions. | |
""" | |
import pip | |
import sys, xmlrpclib | |
from cStringIO import StringIO | |
from distutils.version import StrictVersion, LooseVersion |
This file contains hidden or 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 __future__ import with_statement | |
from fabric.api import env, run, settings, hide | |
from fabric.decorators import hosts, runs_once | |
env.venv_path = "/home/webdev/.virtualenvs/twtv3/" | |
env.user = 'webdev' | |
env.hosts = [ | |
'172.16.12.27', | |
# '172.16.12.33', | |
'172.16.12.48', |
This file contains hidden or 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 __future__ import with_statement | |
from fabric.api import env, run, settings, hide, local | |
from fabric.decorators import hosts, runs_once | |
import os | |
import pip | |
import sys, xmlrpclib | |
from cStringIO import StringIO | |
from distutils.version import StrictVersion, LooseVersion | |
def _find_current_version(package, index_urls=None): |
This file contains hidden or 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 | |
import textwrap, virtualenv | |
def adjust_options(options): | |
voot_opts = { | |
'no_site_packages': not options.use_site_packages, | |
'unzip_setuptools': not options.zip_setuptools, | |
'use_distribute': not options.setuptools, | |
} |
This file contains hidden or 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
""" | |
A model field and widget that allows selecting multiple items from a static | |
list of choices. Based on http://djangosnippets.org/snippets/1200/ | |
""" | |
from django.db import models | |
from django.core import exceptions | |
from django import forms | |
from django.utils.text import capfirst | |
class MultiSelectFormField(forms.MultipleChoiceField): |
This file contains hidden or 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
""" | |
Default template for WSGI definition. Assumes virtualenv is in the same | |
directory as this file, and is called virtualenv | |
""" | |
import os, sys, site | |
PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__))) | |
site.addsitedir('virtualenv/lib/python2.6/site-packages') |
This file contains hidden or 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
<VirtualHost *:80> | |
ServerAdmin [email protected] | |
ServerName $$$$PROJECT_NAME$$$$ | |
ServerAlias media-$$$$PROJECT_NAME$$$$ | |
ServerAlias $$$$PROJECT_NAME$$$$.test.education.nationalgeographic.com | |
DocumentRoot $$$$PROJECT_HOME$$$$$$$$PROJECT_NAME$$$$/media | |
WSGIDaemonProcess $$$$PROJECT_NAME$$$$ user=webdev group=webdev \ | |
processes=3 threads=1 maximum-requests=1000 \ | |
python-path=$$$$PROJECT_HOME$$$$$$$$PROJECT_NAME$$$$/example/virtualenv/lib/python2.6/site-packages |
This file contains hidden or 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 | |
## WARNING: This file is generated | |
#!/usr/bin/env python | |
"""Create a "virtual" Python installation | |
""" | |
# If you change the version here, change it in setup.py | |
# and docs/conf.py as well. | |
virtualenv_version = "1.6.3" |
OlderNewer