Skip to content

Instantly share code, notes, and snippets.

View immunda's full-sized avatar

Phil Howell immunda

View GitHub Profile
@immunda
immunda / Dockerfile
Last active August 29, 2015 14:26
Scrapy Dockerfile
FROM debian:wheezy
MAINTAINER Phil Howell
RUN apt-get update && apt-get upgrade -y && apt-get install -y git python-pip python-dev build-essential libssl-dev libffi-dev libxslt-dev
COPY requirements.txt /tmp/requirements.txt
RUN pip install -r /tmp/requirements.txt
RUN mkdir /projects
ADD . /spiders
@immunda
immunda / Dockerfile
Created November 5, 2014 13:07
API Docker config
FROM debian:wheezy
MAINTAINER Phil Howell
RUN apt-get update && apt-get upgrade -y && apt-get install -y python-pip python-dev build-essential libpq-dev libncurses5-dev
COPY requirements.txt /tmp/requirements.txt
RUN pip install -r /tmp/requirements.txt
RUN mkdir /projects
EXPOSE 9090

Keybase proof

I hereby claim:

  • I am immunda on github.
  • I am immunda (https://keybase.io/immunda) on keybase.
  • I have a public key whose fingerprint is 34E1 8F33 7DE4 7897 0069 D47A 6605 A8FA 9E9B 1BD6

To claim this, I am signing this object:

@immunda
immunda / postgres-8.4
Created April 30, 2012 16:37
Postgres init script
# This file contains common functionality for all postgresql server
# package init.d scripts. It is usually included by
# /etc/init.d/postgresql-X.Y.
. /lib/lsb/init-functions
# do pg_ctlcluster action $1 to all clusters of version $2 with command
# description $3; output according to Debian Policy for init scripts
do_ctl_all() {
[ "$1" ] || { echo "Error: invalid command '$1'" >&2; exit 1; }
@immunda
immunda / splitdate.py
Created February 7, 2012 12:03
Example SplitDateField
"""
Release edit date field
"""
class SplitDateWidget(forms.MultiWidget):
def __init__(self, attrs=None):
widgets = (
forms.TextInput(attrs={'placeholder': "DD", 'size': "2", 'maxlength': "2"}),
forms.TextInput(attrs={'placeholder': "MM", 'size': "2", 'maxlength': "2"}),