New site launched!

Today I’m very happy to announce the launch of my new site Previously my open-source code, company information and blog posts had been spread over several different sites. All this various content will be consolidated into a single site here over the next couple of months, which will hopefully allow me to focus more on doing what I love - building beautiful apps, and hacking on open-source code. I’m also hoping to set a regular blogging schedule, so stay tuned for more posts and announcements!...

September 13, 2010 · 1 min · Dave Perrett

Compiling and running red5 flash server on OSX

First, you need to make sure you are using java 1.6. I’m told this method will only work on 64-bit leopard machines, so your mileage may vary. In the finder, browse to /Applications/Utilities and open Java Preferences.app . ...

March 16, 2010 · 2 min · Dave Perrett

Compiling Nginx with flv streaming support on Ubuntu

First, we need to get the latest version of nginx : > wget http://nginx.org/download/nginx-0.8.34.tar.gz > tar xvzf nginx-0.8.34.tar.gz > cd nginx-0.8.34 Next, configure it to support ssl, gzip, flv streaming and real-ip. I generally compile it to /opt/nginx-YYMMDD (change the –prefix setting if you want to put it somewhere else) : ...

March 16, 2010 · 3 min · Dave Perrett

Installing Flex 4 (Gumbo) SDK on OS X

...

March 14, 2010 · 1 min · Dave Perrett

nginx error - 413 Request Entity Too Large

If you’re getting 413 Request Entity Too Large errors trying to upload with {{ “nginx.net/” | ext_link: “Nginx”}}, you need to increase the size limit in nginx.conf . Add ‘client_max_body_size xxM’ inside the server section, where xx is the size (in megabytes) that you want to allow. http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; server { client_max_body_size 20M; listen 80; server_name localhost; # Main location location / { proxy_pass http://127....

November 18, 2009 · 1 min · Dave Perrett

NoReverseMatch : custom registration templates break django unit tests

I’ve over-ridden several of the built-in django auth and {{ “bitbucket.org/ubernostrum/django-registration/” | ext_link: “django-registration”}} templates so I can have my own custom-styled login and registration pages. This all worked fine until i tried to run the built-in django and django_registration test suites, when everything fell apart : ...

November 10, 2009 · 3 min · Dave Perrett

Sending Django email with Gmail

After spending a few hours struggling to get postfix to work with django on my local dev machine, I gave up and decided to use Gmail . To do it, add the following to your settings.py : ...

October 16, 2009 · 1 min · Dave Perrett

'Hello World' with Scala and Lift on OSX

Obviously we’re going to need scala before we can do anything useful; the easiest way to install it is via macports . We’re also going to need maven. > sudo port install scala > sudo port install maven2 Scala seems to have moved their repository to github, and the old google code repository no longer works. Assuming you have git installed (if not, there’s an OS X installer here) : ...

August 17, 2009 · 2 min · Dave Perrett

Customize the Nginx server header

Unfortunately the only way to change the server header in nginx is to actually recompile it from source. Luckily this is quite easy. First, download the latest version of nginx (0.7.61 at the time of writing) : > wget http://sysoev.ru/nginx/nginx-0.7.61.tar.gz > tar xvzf nginx-0.7.61.tar.gz > cd nginx-0.7.61 ...

August 10, 2009 · 2 min · Dave Perrett

Passing IPs to apache with nginx proxy

When you use nginx to proxy to apache , apache picks up the IP address of your nginx proxy as the client. A consequence of this is that apache log files, and any application running on the apache backend, will all receive the same IP address (for example 127.0.0.1 if apache and nginx are running the same server). Luckily, nginx provides a HTTP X-Forwarded-For header containing the clients real IP address, although apache doesn’t pick it up by default. To allow apache to recognize the original client IP, we need to install the mod_rpaf module. On ubuntu, this is as simple as installing a package : ...

August 10, 2009 · 2 min · Dave Perrett