How to set up a quick geocoding system on google spreadsheets.
- Create a new spreadsheet
- Open the Scripts editor and paste the script attached
- Use on your spreadsheet this new formula
=searchMapzen(place_cell,mapzen_api_key)
jQuery(function(){ | |
// Execute this code when the page is ready to work | |
// Create a Script Tag | |
var script=document.createElement('script'); | |
script.type='text/javascript'; | |
script.src= "http://search.twitter.com/search.json?&q=%23Ogilvy&callback=processTheseTweets&_="+ new Date().getTime(); | |
// Add the Script to the Body element, which will in turn load the script and run it. | |
$("body").append(script); | |
}); |
L.TileLayer.TileJSON = L.TileLayer.Canvas.extend({ | |
options: { | |
debug: false | |
}, | |
tileSize: 256, | |
initialize: function (options) { | |
L.Util.setOptions(this, options); |
var express = require('express') | |
, http = require('http') | |
, connect = require('connect') | |
, io = require('socket.io'); | |
var app = express(); | |
/* NOTE: We'll need to refer to the sessionStore container later. To | |
* accomplish this, we'll create our own and pass it to Express | |
* rather than letting it create its own. */ | |
var sessionStore = new connect.session.MemoryStore(); |
var child = require('child_process'), | |
util = require('util'), | |
netstat = child.spawn('netstat', ['-nb']), | |
out = '' | |
netstat.stdout.on('data', function(data) { | |
out += data | |
}) | |
netstat.stderr.on('data', function(data) { | |
console.log('err: ' + data) |
# setup fd 3 as udp connection to drone | |
exec 3<>/dev/udp/192.168.1.1/5556 | |
# takeoff | |
echo -e "AT*REF=1,512\r" >&3 | |
# landing | |
echo -e "AT*REF=2,0\r" >&3 | |
... | |
# profit? |
#! /bin/sh | |
# ------------------------------------------------------------------------------ | |
# SOME INFOS : fairly standard (debian) init script. | |
# Note that node doesn't create a PID file (hence --make-pidfile) | |
# has to be run in the background (hence --background) | |
# and NOT as root (hence --chuid) | |
# | |
# MORE INFOS : INIT SCRIPT http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit | |
# INIT-INFO RULES http://wiki.debian.org/LSBInitScripts | |
# INSTALL/REMOVE http://www.debian-administration.org/articles/28 |
module.exports = function () { | |
// If there is an uncaught exception anywhre in your app, it will result in a proper 500 page. | |
if (Math.random() < 0.3) throw new Error("Oops, my random is low"); | |
// They don't have to happen in the first tick either | |
if (Math.random() < 0.2) return setTimeout(function () { | |
throw new Error("Delayed random bites"); | |
}); | |
// If you throw an object, it will send a JSON document to the client | |
if (Math.random() > 0.6) throw {Hello: request.url}; |
The import_quattroshapes_pgsql.sh
shell-script will import all Quattroshapes shapefiles
into a PostgreSQL database. The process has some gotchas and is generally painful to do manually. Before running the
script, ensure that you are logged in as a user with permissions to access/write to PostgreSQL. Then:
bash import_quattroshapes_pgsql.sh
Note that the script will create a Postgres table quattroshapes
, and download all Quattroshapes shapefiles into
IMPORTANT: this is outdated, go to https://github.com/netroy/Lockets | |
"npm install socket-io" & you are ready to go |