Skip to content

Instantly share code, notes, and snippets.

View konradhalas's full-sized avatar

Konrad Hałas konradhalas

View GitHub Profile
@aht
aht / gist:5097702
Created March 6, 2013 08:45
ansible postgres playbook with PostGIS on Ubuntu, setting up postgis_template and creating databases from this postgis_template
# Based on https://github.com/ansible/ansible/blob/devel/examples/playbooks/postgresql.yml
---
- hosts: postgres.vm
sudo: yes
tasks:
- name: ensure latest postgres & postgis packages are latest
action: apt pkg=$item update_cache=yes state=latest
with_items:
@konradhalas
konradhalas / views.py
Last active December 16, 2015 09:48
Simple view wrapper. Now you can convert old, ugly view function into class based view.
from django.views.generic import View
from django.core.exceptions import ImproperlyConfigured
from django.contrib.auth.views import login
class WrapperView(View):
@property
def view_function(self):
raise ImproperlyConfigured("You must define a 'view_function'.")
@cviebrock
cviebrock / select2-foundation5.css
Created December 20, 2013 15:56
Select2 CSS for Zurb Foundation 5
/*
Version: 3.4.5 Timestamp: Mon Nov 4 08:22:42 PST 2013
*/
.select2-container {
margin: 0 0 1rem 0;
position: relative;
vertical-align: middle;
font-family: inherit;
-webkit-appearance: none !important;
font-size: 0.875rem;