Skip to content

Instantly share code, notes, and snippets.

@MattSurabian
MattSurabian / google-maps-loader.js
Last active June 26, 2019 16:07
Boilerplate RequireJS module to async load the google maps api and still be able to bundle with rjs. Cooked up with @adamjarret
/**
* GoogleMapsAPI Loader Module
*
* Returns a promise that resolves with the google.maps object when all of the google maps api loading process is complete
*
* Example Usage:
*
* define([ 'app/lib/google-maps-loader' ], function(GoogleMapsLoader){
* GoogleMapsLoader.done(function(GoogleMaps){
* // your google maps code here!
@jorilallo
jorilallo / gist:1701845
Created January 30, 2012 01:38
Tastypie paginated search for Haystack
from django.conf.urls.defaults import *
from tastypie.paginator import Paginator
from tastypie.exceptions import BadRequest
from tastypie.resources import ModelResource
from tastypie.utils import trailing_slash
from haystack.query import SearchQuerySet, EmptySearchQuerySet
from clips.models import Clip