Skip to content

Instantly share code, notes, and snippets.

@geoffgarside
geoffgarside / gist:723410
Created December 1, 2010 12:19
Construction of a UK Postcode Regular Expression

First Half

Character sets for positions

  1. [A-PR-UWYZ]
  2. [A-HK-Y]
  3. [A-HJKS-UW]
  4. [ABEHMNPRV-Y]

Formats

#!/bin/sh
set -u
set -e
# Example init script, this can be used with nginx, too,
# since nginx and unicorn accept the same signals
# Feel free to change any of the following variables for your app:
APP_ROOT=/k/app_name/current
PID=/var/run/unicorn/unicorn.pid
ENV=production