This file contains hidden or 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 simplejson | |
from flask import Flask, g, request | |
from couchdb.design import ViewDefinition | |
import flaskext.couchdb | |
app = Flask(__name__) | |
""" | |
CouchDB permanent view |
This file contains hidden or 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
/* | |
* L.TileLayer.LocalCache : A tile layer using SQL Storage, if available. | |
*/ | |
L.TileLayer.LocalCache = L.TileLayer.extend({ | |
options: { | |
minZoom: 0, | |
maxZoom: 18, | |
tileSize: 256, | |
subdomains: 'abc', |
This file contains hidden or 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 base64 | |
from StringIO import StringIO | |
from django.http import HttpResponse | |
from django.utils import simplejson | |
from easydict import EasyDict as edict | |
from landez import TilesManager | |
from . import app_settings |
This file contains hidden or 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
#!/bin/bash | |
# Script by MapOSMatic | |
# (Maxime Petazzoni) | |
STATE=${HOME}/replication_-_15mn/osmosis/last.state.txt | |
rep=`cat ${STATE} |\ | |
grep 'timestamp' |\ | |
awk '{split($0, a, "="); print a[2]}' |\ |
This file contains hidden or 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
#!/bin/sh | |
# Script by MapOSMatic | |
# (Maxime Petazzoni) | |
LOG_FILE="/home/osm/replication_-_15mn/planet-update.log" | |
PID_FILE="/home/osm/replication_-_15mn/planet-update.pid" | |
OSM2PGSQL="/usr/bin/osm2pgsql" | |
OSM2PGSQL_STYLE="/usr/share/osm2pgsql/default.style" |
This file contains hidden or 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
""" | |
``ass2dcl`` converts subtitles from ASS to DCSubtitle format. | |
It depends on python3 and `pysub <http://pypi.python.org/pypi/pysubs>`_. | |
INSTALL | |
:: |
This file contains hidden or 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 casper = require("casper").create({ | |
viewportSize: {width: 1600, height: 1200}, | |
//verbose: true, | |
//logLevel: 'debug', | |
onError: function(self, m) { // Any "error" level message will be written | |
console.log('FATAL:' + m); // on the console output and PhantomJS will | |
self.exit(); // terminate | |
}, | |
}); |
This file contains hidden or 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
{% load leaflet_tags %} | |
<html> | |
<head> | |
{% leaflet_js %} | |
{% leaflet_css %} | |
</head> | |
<body> | |
<h1>Django-Leaflet</h1> | |
{% leaflet_map "main" %} | |
</body> |
This file contains hidden or 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 MushroomSpot = Backbone.Model.extend({ | |
defaults: function() { | |
return { | |
mushroom: "Unknown", | |
area: [0.0, 0.0] | |
}; | |
}, | |
initialize: function() { |
This file contains hidden or 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
L.Map.include(L.LayerIndexMixin); | |
var map = L.map('map'); | |
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png').addTo(map); | |
map.fitWorld(); | |
map.addControl(new L.Control.Information()); | |
for (var i=0; i<5000; i++) { | |
var lat = Math.random() * 170 - 85 | |
, lng = Math.random() * 350 - 175; |
OlderNewer