Author: Sean Gillies Version: 1.0
This document describes a GeoJSON-like protocol for geo-spatial (GIS) vector data.
<script> | |
// test for localStorage support | |
if(('localStorage' in window) && window['localStorage'] !== null){ | |
var f = document.getElementById('mainform'); | |
// test with PHP if the form was sent (the submit button has the name "sent") | |
<?php if(isset($_POST['sent']))){?> | |
// get the HTML of the form and cache it in the property "state" | |
localStorage.setItem('state',f.innerHTML); |
> m = 2.days.method(:ago) | |
=> #<Method: Fixnum(ActiveSupport::CoreExtensions::Numeric::Time)#ago> | |
> m.__file__ | |
=> "/Users/paul/.rvm/gems/ree-1.8.7-2011.03@deals/gems/activesupport-2.3.5/lib/active_support/core_ext/numeric/time.rb" | |
> m.__line__ | |
=> 64 | |
> class Method; def open_in_textmate; `mate -l #{__line__} #{__file__}`; end; end | |
=> nil | |
> 2.days.method(:ago).open_in_textmate | |
=> "" |
/************************************************************************** | |
* OSM2GEO - OSM to GeoJSON converter | |
* OSM to GeoJSON converter takes in a .osm XML file as input and produces | |
* corresponding GeoJSON object. | |
* | |
* AUTHOR: P.Arunmozhi <[email protected]> | |
* DATE : 26 / Nov / 2011 | |
* LICENSE : WTFPL - Do What The Fuck You Want To Public License | |
* LICENSE URL: http://sam.zoy.org/wtfpl/ | |
* |
# Add to your `.bash_profile`. If you do something that is incredibly | |
# destructive, like `git push --force origin HEAD`, you can then | |
# delete it, how ever many times you've run it, from your history | |
# using `hidegrep --force`. | |
function hidegrep() | |
{ | |
while true; do | |
hist=$(history | grep -e "$1" | head -n 1) | |
if [ -z "$hist" ]; then break; fi |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
What is this? It's about 7 years of OpenStreetMap growth. Each step in the animation is 72 days, and the colors alternate between red and blue. The data is from Latest Weekly Changesets from planet.openstreetmap.org, processed into an SQLite database with sometimemachine. The points being drawn are the centers of the bounding boxes of changesets. There are 13,098,655 changesets in the database. The script to generate the visualization is below, and the rest of the make steps are
gm mogrify -format gif *.png
gifsicle --loop -d20 *.gif > ../animation.gif
Requiring gifsicle and graphicsmagick.
Fast growth in rectangular areas (like the DRC) is typically because of imports to the OSM data from other open datasources. The d
var gpio = require("gpio") | |
var gpio22, intervalTimer | |
// Flashing lights if LED connected to GPIO22 | |
gpio22 = gpio.export(22, { | |
ready: blinkLED | |
}) | |
function blinkLED() { | |
intervalTimer = setInterval(function() { |
34.23k
- http://leafletjs.com/download.html47.15k
- https://github.com/Esri/esri-leaflet/blob/master/dist/esri-leaflet.js58.64k
- http://www.mapbox.com/mapbox.js/api/v1.3.1/85.53k
- http://ol3js.org/150.25k
- http://developers.cartodb.com/documentation/cartodb-js.html#sec-1187.78k
- http://openlayers.org/api/OpenLayers.js204.54k
(no Dijit theme) - http://js.arcgis.com/3.6compact/325.43k
(Claro Dijit theme)- http://js.arcgis.com/3.6/The command I used to estimate the size once gzipped is gzip -c filename.min.js | wc -c
. Every library except open layers includes it CSS in the total size. Esri Standard includes the Claro widget theme but compact does not.
import os, urllib, urllib2, datetime, arcpy, json | |
## ============================================================================== ## | |
## function to update a field - basically converts longs to dates for date fields ## | |
## since json has dates as a long (milliseconds since unix epoch) and geodb wants ## | |
## a proper date, not a long. | |
## ============================================================================== ## | |
def updateValue(row,field_to_update,value): | |
outputfield=next((f for f in fields if f.name ==field_to_update),None) #find the output field |