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
sudo apt-get install postgis postgresql-9.3-postgis-2.1 | |
sudo -iu postgres createuser proj123 -S -D -R | |
sudo -iu postgres createdb proj123 -O proj123 | |
sudo -iu postgres psql -c \"alter user proj123 with password 'proj123';\" | |
sudo -iu postgres psql proj123 -c \"CREATE EXTENSION postgis;\ | |
sudo -iu postgres psql proj123 -c \"CREATE EXTENSION postgis_topology;\"" | |
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 staticfiles %} | |
<!doctype html> | |
<style> | |
#map { | |
height: 500px; | |
} | |
</style> | |
cool! |
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
LEAFLET_CONFIG = { | |
'SPATIAL_EXTENT': (30, 29, 36, 33.5), | |
# 'DEFAULT_CENTER': MAP_CENTER, | |
'DEFAULT_ZOOM': 8, | |
'TILES': [ | |
('OVI Satellite', | |
'http://maptile.maps.svc.ovi.com/maptiler/maptile/newest/satellite.day/{z}/{x}/{y}/256/png8', | |
'OVI maps'), |
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
def calc(s): | |
return 4 |
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
"use strict"; | |
$(function () { | |
$.get("/the/url/of/the/maps/", function (maps) { | |
$.each(function (i, map) { | |
console.log(map); | |
}) | |
}); |
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
<table id="mytable" border="1"> | |
<tr> | |
<td>1</td> | |
<td>1</td> | |
<td>1</td> | |
<td>1</td> | |
</tr> | |
<tr> | |
<td>1</td> | |
<td>1</td> |
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
<div id="add">Add!!</div> | |
<ul id="foo"> | |
<li>0</li> | |
<li>0</li> | |
<li>0</li> | |
<li>0</li> | |
<li>0</li> | |
<li>0</li> | |
<li>0</li> |
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 os | |
# ...... | |
if os.name == 'nt': | |
OSGEO4W = r"C:\OSGeo4W" | |
os.environ['OSGEO4W_ROOT'] = OSGEO4W | |
os.environ['GDAL_DATA'] = OSGEO4W + r"\share\gdal" | |
os.environ['PROJ_LIB'] = OSGEO4W + r"\share\proj" | |
os.environ['PATH'] = OSGEO4W + r"\bin;" + os.environ['PATH'] |
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
$(function () { | |
"use strict"; | |
$("#update-btn").click(function () { | |
var el = $(this); | |
if (el.attr("disabled")) { | |
return; | |
} | |
var url = el.data("url"); | |
el.attr('disabled', "true"); |
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 staticfiles %} | |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> | |
<title>Ex Man!!!!!</title> |