Skip to content

Instantly share code, notes, and snippets.

View dpetzold's full-sized avatar

Derrick Petzold dpetzold

View GitHub Profile
* << Request >> 32770
- Begin req 32769 rxreq
- Timestamp Start: 1467657059.275449 0.000000 0.000000
- Timestamp Req: 1467657059.275449 0.000000 0.000000
- ReqStart 172.17.0.1 39322
- ReqMethod GET
- ReqURL /
- ReqProtocol HTTP/1.1
- ReqHeader User-Agent: curl/7.40.0
- ReqHeader Accept: */*
@dpetzold
dpetzold / fastcgi-django
Created September 7, 2010 22:28
Init script for fastcgi and django.
#! /bin/sh
### BEGIN INIT INFO
# Provides: FastCGI servers for Django
# Required-Start: networking
# Required-Stop: networking
# Default-Start: 2 3 4 5
# Default-Stop: S 0 1 6
# Short-Description: Start FastCGI servers with Django.
# Description: Django, in order to operate with FastCGI, must be started
# in a very specific way with manage.py. This must be done
@dpetzold
dpetzold / to_ipod.py
Created August 20, 2010 22:00
Convert and video to ipod viewable using ffmpeg capturing the output to a display the encoding progress.
#!/usr/bin/python
import fcntl
import optparse
import os
import progressbar
import re
import select
import shlex
import subprocess
#!/bin/sh
## BEGIN INIT INFO
# Provides: FastCGI servers for PHP
# Required-Start: networking
# Required-Stop: networking
# Default-Start: 2 3 4 5
# Default-Stop: S 0 1 6
# Short-Description: Start FastCGI servers with PHP.
# Description: Start PHP with spawn-fcgi. For use with nginx and lighttpd.
from django.conf import settings
from django.contrib.auth import models as auth_models
import cgi
import urllib
import simplejson
from <app_name> import models
class FacebookBackend:
#!/usr/bin/python
import os
import sys
import optparse
import progressbar
import time
from boto.s3.connection import S3Connection
from boto.exception import S3ResponseError
-module(db).
-export([new/0, write/3, destroy/1, delete/2, read/2, match/2, test/0]).
new() -> [].
write(Key, Element, Db) -> [{Key, Element}|Db].
read(Key, [Head | Tail]) ->
{K, V} = Head,
if