Skip to content

Instantly share code, notes, and snippets.

View evildmp's full-sized avatar

Daniele Procida evildmp

  • Canonical
  • Cardiff, Wales
View GitHub Profile
rabbitmq:
image: rabbitmq:3.5-management
hostname: rabbitmq
ports:
- "15672:15672"
expose:
- "15672"
environment:
RABBITMQ_ERLANG_COOKIE: <use the secret cookie here>
➜ cgjunghaus git:(develop) ✗ docker-compose build web
Building web
Step 1/10 : FROM divio/base:4.11-py3.6-slim-stretch
---> 6fe7e49a6702
Step 2/10 : ENV NGINX_CONF_PATH=/
---> Using cache
---> 9a2df5645206
Step 3/10 : RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y locales gcc
---> Running in 37a7aa910c14
Ign:1 http://deb.debian.org/debian stretch InRelease
celerybeat:
build: "."
command: "aldryn-celery beat"
env_file: .env-local
links:
- "db:postgres"
- "rabbitmq:rabbitmq"
volumes:
- ".:/app:rw"
- "./ data:/data:rw"
---
celerybeat:
build: "."
command: "aldryn-celery beat"
env_file: .env-local
links:
- "db:postgres"
- "rabbitmq:rabbitmq"
volumes:
- ".:/app:rw"
@evildmp
evildmp / gist:b32d7f3b8038c4e2ee8cd28d28809a91
Created November 22, 2018 14:55
Delete all pages in site(s)
from cms.models import Page
pages = (
Page
.objects
.filter(node__site_id__in=[28, 15], node__depth=1) # Important! Make sure the site_id values are correct...
.select_related('node')
.distinct()
.order_by('node__path')
)
total = pages.count()
# -------------- models.py --------------
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext as _
from django.db import models
from django.db.models.signals import post_save
@evildmp
evildmp / readme.rst
Last active September 5, 2016 18:26 — forked from FinalAngel/readme.rst

django CMS Image

django CMS Image is a plugin for django CMS that allows you to add images to your project's content.

;
; BIND data file for apple-juice.co.uk
;
$ttl 38400
apple-juice.co.uk. IN SOA ns1.thel33t.net. postmaster.thel33t.net. (
2010090402
3600
3600
604800
38400 )
@evildmp
evildmp / House with a hundred rooms
Last active November 24, 2022 06:40
The CHills, House with a hundred rooms
The Chills, House with a hundred rooms
Thunderwarm autumn winds blow,
Their inevitable decay to trees that know
In fresh summer shade where the leaf let go
But just standing still in twilight gloom,
By my house with a hundred rooms,
The lights are for the likes of you.
@evildmp
evildmp / hamlet.py
Last active July 27, 2016 15:10
Hamlet for two voices, in Python
# coding=UTF8
# Hamlet, for two voices
# after Ulises Carrión
#
# https://en.wikipedia.org/wiki/Ulises_Carrión
#
# Ulises Carrión's recording of Hamlet, for two voices:
# https://www.dropbox.com/s/vyi3psnt0da2hu0/Hamlet%20for%20two%20voices.mp3?dl=0
# Requires: