This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getPhoto(mealId, sourceType, saveOnSuccess) { | |
var $mealDiv = $('#log-meal-' + mealId); | |
var $mealImg = $mealDiv.find('.log-meal-photo-button img'); | |
var $quickpicStatus = $('#mobile-quickpic-link span'); | |
function resetQuickPicStatus() { | |
$quickpicStatus.html('').addClass('icon-camera'); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var map = new L.Map('map'); | |
var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/API-KEY/997/256/{z}/{x}/{y}.png', | |
cloudmadeAttrib = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade', | |
cloudmade = new L.TileLayer(cloudmadeUrl, {maxZoom: 18, attribution: cloudmadeAttrib}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var map = new L.Map('map'); | |
var mapquestUrl = 'http://{s}.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png', | |
subDomains = ['otile1','otile2','otile3','otile4'], | |
mapquestAttrib = 'Data, imagery and map information provided by <a href="http://open.mapquest.co.uk" target="_blank">MapQuest</a>, | |
<a href="http://www.openstreetmap.org/" target="_blank">OpenStreetMap</a> and contributors. | |
var mapquest = new L.TileLayer(mapquestUrl, {maxZoom: 18, attribution: mapquestAttrib, subdomains: subDomains}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
from django.utils.text import compress_string | |
from django.utils.cache import patch_vary_headers | |
from django import http | |
try: | |
import settings | |
XS_SHARING_ALLOWED_ORIGINS = settings.XS_SHARING_ALLOWED_ORIGINS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>DVTConsoleDebuggerInputTextColor</key> | |
<string>0 0 0 1</string> | |
<key>DVTConsoleDebuggerInputTextFont</key> | |
<string>Menlo-Bold - 11.0</string> | |
<key>DVTConsoleDebuggerOutputTextColor</key> | |
<string>0 0 0 1</string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title":"Food", | |
"articles": | |
[ | |
{ | |
"url":"http://oursocialbloggingsite.com/api/articles/111", | |
"title":"Why Food Is Delicious", | |
"author":"Abe Adams" | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyGeoResource(Resource): | |
def apply_sorting(self, objects, options=None): | |
if options and "longitude" in options and "latitude" in options: | |
return objects.distance(Point(options['latitude'], options['longitude'])).order_by('distance') | |
return super(MyGeoResource, self).apply_sorting(objects, options) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* Convert <select> elements to Dropdown Group | |
* | |
* Author: John Rocela 2012 <[email protected]> | |
* Update: Fixed issue with selected showing value instead of text Colin Faulkingham <[email protected]> 2012 | |
*/ | |
jQuery(function($){ | |
$('select').each(function(i, e){ | |
if (!($(e).data('convert') == 'no')) { | |
$(e).hide().wrap('<div class="btn-group" id="select-group-' + i + '" />'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config.json: | |
{ | |
"database": { | |
"connection": "pg://postgres:[email protected]:5432/test" | |
}, | |
"web": { | |
"port": 8000 | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Portions of this code and logic copied from OpenLayers and | |
* redistributed under the original Clear BSD license terms: | |
* | |
* http://trac.osgeo.org/openlayers/browser/license.txt | |
* | |
* Copyright 2005-2010 OpenLayers Contributors, released under | |
* the Clear BSD license. See authors.txt for a list of contributors. | |
* All rights reserved. | |
* |