Skip to content

Instantly share code, notes, and snippets.

View icepol's full-sized avatar

Pavel Kočí icepol

View GitHub Profile

Keybase proof

I hereby claim:

  • I am icepol on github.
  • I am pavelkoci (https://keybase.io/pavelkoci) on keybase.
  • I have a public key whose fingerprint is 6E64 9E28 04F0 D718 275C 18FD D938 3237 98E9 C6F0

To claim this, I am signing this object:

@icepol
icepol / server.conf
Created September 9, 2014 23:37
Respond to the OPTIONS request direct from the NGINX.
server {
listen 80;
server_name www.server.name;
location / {
# set default content type here
# add_header may cause double header
types {}
default_type text/html;
@icepol
icepol / gist:3786835
Created September 26, 2012 08:42
Make Postgres DB connection persistent
from django.core import signals
from django.db import close_connection
signals.request_finished.disconnect(close_connection)