The popular open-source contract for web designers and developers by Stuff & Nonsense
- Originally published: 23/12/2008
- Revised date: 15/12/2013
- Original post
| #!/bin/sh | |
| # | |
| # This script will hold your hand during the process of converting an existing Drupal 7 file field from public to private. | |
| # | |
| # http://twitter.com/thsutton | |
| # http://www.linkedin.com/pub/thomas-sutton/55/391/350 | |
| # http://thomas-sutton.id.au/ | |
| set -eu |
| # Call virtualenvwrapper's "workon" if .venv exists. This is modified from-- | |
| # http://justinlilly.com/python/virtualenv_wrapper_helper.html | |
| # which is linked from-- | |
| # http://virtualenvwrapper.readthedocs.org/en/latest/tips.html#automatically-run-workon-when-entering-a-directory | |
| check_virtualenv() { | |
| if [ -e .venv ]; then | |
| env=`cat .venv` | |
| if [ "$env" != "${VIRTUAL_ENV##*/}" ]; then | |
| echo "Found .venv in directory. Calling: workon ${env}" | |
| workon $env |
| sudo apt-get update | |
| sudo apt-get install python-virtualenv | |
| sudo apt-get install python-dev | |
| sudo apt-get install postgresql | |
| sudo apt-get install postgresql-server-dev-9.3 | |
| sudo apt-get install redis-server | |
| sudo -u postgres createuser -s sentry | |
| sudo -u postgres psql -c "alter user sentry with password 'sentry';" |
| Ort;Zusatz;Plz;Vorwahl;Bundesland | |
| Aach;b Trier;54298;0651;Rheinland-Pfalz | |
| Aach;, Hegau;78267;07774;Baden-Württemberg | |
| Aachen;;52062;0241;Nordrhein-Westfalen | |
| Aachen;;52064;0241;Nordrhein-Westfalen | |
| Aachen;;52066;0241;Nordrhein-Westfalen | |
| Aachen;;52068;0241;Nordrhein-Westfalen | |
| Aachen;;52070;0241;Nordrhein-Westfalen | |
| Aachen;;52072;0241;Nordrhein-Westfalen | |
| Aachen;;52074;0241;Nordrhein-Westfalen |
| #!/bin/sh | |
| # path settings | |
| MYSQL=`which mysql` | |
| # mysql settings | |
| DB="MYDB" | |
| HOST="127.0.0.1" | |
| USER="root" | |
| PASS="root" |
Dockerfile that is based on your production image and
simply install xdebug into it. Exemple:FROM php:5
RUN yes | pecl install xdebug \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
| from __future__ import absolute_import, unicode_literals | |
| import django | |
| import django.forms | |
| import wagtail.wagtailforms.models as form_models | |
| from django.db import models | |
| from django.shortcuts import render | |
| from django.utils.translation import ugettext_lazy as _ | |
| from modelcluster.fields import ParentalKey | |
| from wagtail.wagtailadmin.edit_handlers import ( |
| from __future__ import with_statement | |
| from fabric.api import * | |
| from fabric.operations import get | |
| from fabric.contrib.files import exists | |
| from contextlib import contextmanager | |
| import os | |
| env.roledefs = { | |
| 'web': ['server1.example.com', 'server2.example.com'], |
| #!/bin/bash | |
| # http://stackoverflow.com/questions/23548188/how-do-i-compile-python-3-4-with-custom-openssl | |
| openssl_version="openssl-1.0.2g" | |
| openssl_package="${openssl_version}.tar.gz" | |
| openssl_home="/opt/$openssl_version" | |
| curl https://www.openssl.org/source/$openssl_package | tar xz && cd $openssl_version && ./config shared --prefix=$openssl_home && make -j8 && sudo make install | |
| export CFLAGS="-I$openssl_home/include" |