- create a new redis .conf file
$ cp /etc/redis.conf /etc/redis-xxx.conf- edit /etc/redis-xxx.conf, illustrated as below
...| import sys | |
| from os import environ | |
| import logging | |
| from apistar import http | |
| from raven import Client | |
| from apistar import App | |
| from apistar.test import TestClient | |
| from apistar import Route | |
| settings = { |
| ###################################### | |
| # INSTALL OPENCV ON UBUNTU OR DEBIAN # | |
| ###################################### | |
| # 1. KEEP UBUNTU OR DEBIAN UP TO DATE | |
| sudo apt-get -y update | |
| sudo apt-get -y upgrade | |
| sudo apt-get -y dist-upgrade | |
| sudo apt-get -y autoremove |
| # | |
| # Target OS Ubuntu Server 14.04 Trusty | |
| # Chef 11.8.2 | |
| # Author: danigosa | |
| # Date: 17/04/2014 | |
| # | |
| # | |
| include_recipe "provision::common" |
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
| VAGRANTFILE_API_VERSION = "2" | |
| Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
| # All Vagrant configuration is done here. The most common configuration | |
| # options are documented and commented below. For a complete reference, | |
| # please see the online documentation at vagrantup.com. |
$ cp /etc/redis.conf /etc/redis-xxx.conf...| #!/usr/bin/env python | |
| import xmlrpc.client as client | |
| import pip | |
| pypi = client.ServerProxy('http://pypi.python.org/pypi') | |
| for dist in pip.get_installed_distributions(): | |
| available = pypi.package_releases(dist.project_name) | |
| if not available: | |
| # Try to capitalize pkg name |
| #!/bin/bash | |
| # Script to supervise processes | |
| # Full supervisord config here: https://www.digitalocean.com/community/tutorials/how-to-install-and-manage-supervisor-on-ubuntu-and-debian-vps | |
| while true | |
| do | |
| SERVICE="$1" | |
| RESULT=`killall -q -0 $1 && echo running` | |
| if [ "${RESULT:-null}" = null ]; then | |
| echo "Not running!, Starting process..." | |
| # Start targeted process here! |
| from datetime import date, datetime, time | |
| from warnings import warn | |
| from django.db import models | |
| from django.db.models import fields | |
| from south.db import generic | |
| from south.db.generic import delete_column_constraints, invalidate_table_constraints, copy_column_constraints | |
| from south.exceptions import ConstraintDropped | |
| from south.utils.py3 import string_types | |
| try: | |
| from django.utils.encoding import smart_text # Django >= 1.5 |
| class TempResource(Resource): | |
| class Meta: | |
| resource_name = 'temp_resource' | |
| object_class = temp_resource.delay | |
| authorization = Authorization() | |
| allowed_methods = ['post', 'get'] | |
| always_return_data = True | |
| def get_resource_uri(self, bundle_or_obj): | |
| """ |
| from uuidfield.fields import StringUUID | |
| from django.utils.encoding import smart_unicode | |
| __author__ = 'danigosa' | |
| from uuidfield import UUIDField | |
| class MssqlUUIDField(UUIDField): | |
| """ | |
| A field which stores a UUID value in hex format. This may also have |