Wes Winham winhamwr@gmail.com
There are many tutorials floating around the web that almost get you a dynamic VPN in EC2. The goal of this tutorial is to be a one-stop-shop for this specific setup.
| #! /usr/bin/env python | |
| """ | |
| Update a set of virtualenvs based on a given set of pip requirements files | |
| whenever those files change. Keeps track of requirements file changes by md5 | |
| hashing the files and storing that hash in the virtualenv. That means that | |
| only updates to the files themselves will trigger updating (changes to a | |
| repository won't be caught). | |
| Optionally also supports uploading/downloading a full bundle of all requirements | |
| to/from Amazon S3 based on the requirements hash in order to ensure that |
| """ | |
| Celery base task aimed at longish-running jobs that return a result. | |
| ``AwesomeResultTask`` adds thundering herd avoidance, result caching, progress | |
| reporting, error fallback and JSON encoding of results. | |
| """ | |
| from __future__ import division | |
| import logging | |
| import simplejson |
Wes Winham winhamwr@gmail.com
There are many tutorials floating around the web that almost get you a dynamic VPN in EC2. The goal of this tutorial is to be a one-stop-shop for this specific setup.
| #!/usr/bin/env python | |
| import optparse, subprocess, logging, os, sys, shutil | |
| APT_COMMAND = 'apt-get -o Dpkg::Options::="--force-confnew" -y --force-yes -qq install %s' | |
| def apt_install(app): | |
| logging.info("Calling: %s" % (APT_COMMAND % app)) | |
| subprocess.call(APT_COMMAND % app, shell=True) |
| /var/log/celery/*.log { | |
| weekly | |
| missingok | |
| rotate 52 | |
| compress | |
| delaycompress | |
| notifempty | |
| copytruncate | |
| } |
| def build_document_pdf(document, realtime=False, timeout=None, watermark=True): | |
| """ | |
| Builds and caches a PDF copy of this document. | |
| If ``realtime`` is True, returns the URL to the PDF. Otherwise, the PDF is | |
| generated as asynchronously in the background. | |
| """ | |
| if not timeout: | |
| timeout = print_settings.PRINTING_TIMEOUT | |
| pdf_generator = DocumentPdfGenerator() |
| #!/bin/bash | |
| function main() | |
| { | |
| monitor_from_file $* | |
| } | |
| function monitor_vpn_ip_port() | |
| { | |
| local CONN_NAME=$1 |
| [group:kegbot] | |
| programs=kegbot_core,kegboard_daemon,kegbot_runserver | |
| [program:kegbot_core] | |
| command=/opt/kegbot/env/bin/kegbot_core.py | |
| directory=/opt/kegbot | |
| user=kegbot | |
| environment=HOME='/home/kegbot' | |
| numprocs=1 | |
| autostart=true |
| /** | |
| * WYMeditor : what you see is What You Mean web-based editor | |
| * Copyright (c) 2005 - 2009 Jean-Francois Hovinne, http://www.wymeditor.org/ | |
| * Dual licensed under the MIT (MIT-license.txt) | |
| * and GPL (GPL-license.txt) licenses. | |
| * | |
| * For further information visit: | |
| * http://www.wymeditor.org/ | |
| * | |
| * File Name: |
| /** | |
| Automatically saves a policy every REFRESH milliseconds through AJAX, | |
| but only when the .autosave form has changed. To use, add the class autosave | |
| to your form. | |
| Note: REFRESH must always be bigger than SAVE_TIMEOUT, otherwise a broken | |
| save will cause deadlock for pending. | |
| **/ | |
| function processJson(data) { |