Skip to content

Instantly share code, notes, and snippets.

View luismanolo's full-sized avatar

luismanolo luismanolo

  • San Vicente de la Sonsierra, Spain
View GitHub Profile
angular.module('ymusica').controller('AlbumSearch', ['$scope', 'Albums', 'Artists', '$q', function($scope, albums, artists, $q) {
$scope.albums = [];
$scope.artists = [];
var terms = new Rx.Subject();
$scope.searchMusic = terms.onNext.bind(terms);
terms.sample(250)
#!/bin/bash
#
# Install Postgres 9.1, PostGIS 2.0 and pgRouting on a clean Ubuntu 12.04 install (64 bit)
# updated to PostGIS 2.0.1
# basics
apt-get install python-software-properties
apt-add-repository ppa:sharpie/for-science # To get GEOS 3.3.3
# install the following pacakages
var myApp = angular.module('myApp').config(function($httpProvider) {
$httpProvider.defaults.headers.post['X-CSRFToken'] = $('input[name=csrfmiddlewaretoken]').val();
});
HTML5 Django DateTimeWidget
See rest of the code and instructions at:
http://copiesofcopies.org/webl/ ( http://copiesofcopies.org/webl/2010/04/26/a-better-datetime-widget-for-django/ )
For localized times, use with django-timezones:
from timezones.forms import LocalizedDateTimeField
date_field = LocalizedDateTimeField(