Skip to content

Instantly share code, notes, and snippets.

View jsanz's full-sized avatar
🗺️
Mapping

Jorge Sanz jsanz

🗺️
Mapping
View GitHub Profile
@thoop
thoop / .htaccess
Last active January 27, 2024 14:07
Official prerender.io .htaccess for Apache.
# Change YOUR_TOKEN to your prerender token
# Change http://example.com (at the end of the last RewriteRule) to your website url
<IfModule mod_headers.c>
RequestHeader set X-Prerender-Token "YOUR_TOKEN"
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active April 25, 2024 02:01
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@KonradIT
KonradIT / readme.md
Last active September 25, 2023 01:55
GoPro Studio for Linux
Water Management Projects with FOSS4G:
International Water Management Institute, University of Moratuwa, Sri Lanka
Research & Monitoring
Evapotranspiration model
Road condition monitoring
PyWPS y Grass
http://www.slideshare.net/HirofumiHayashi/combining-foss4g-open-hardware-for-research-monitoring-in-southern-asia
San Jose Water Company, USA

requirements

  • gdal (and python bindings)
  • cartodb up and running
    • it would be nice to use ghost tables branch (CDB-2572) so it can get tables into the dashboard. requires resque to be running also.

quick start

# Download shaded relief from natural earth (http://www.naturalearthdata.com/downloads/10m-raster-data/10m-shaded-relief/)
make prepare

Introduction to the CartoDB interface

This page can always be found at: http://bit.ly/cdb-harvard

  • Tour of dashboard
  • Common data
  • Uploading data
  • Tour of table and map view
  • Publishing maps
  • Public profile
@andy-esch
andy-esch / index.html
Last active August 29, 2015 14:19
custom hoverwindows using callback objects
<!DOCTYPE html>
<html>
<head>
<title>
customhoverwindows | CartoDB
</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
@vehrka
vehrka / gist:c33c65ab366e7aec14ad
Created April 14, 2015 07:23
How to create hexagonal grids in PostGIS
-- Function: makegrid_epsg3857(text, text, text, numeric)
-- DROP FUNCTION makegrid_epsg3857(text, text, text, numeric);
CREATE OR REPLACE FUNCTION makegrid_epsg3857(schemaname text, boundingbox text, gridtable text, halfwidth numeric)
RETURNS text AS
$BODY$
DECLARE
tbl_cnt int;
XMIN numeric;
@chriswhong
chriswhong / getCurrentView.js
Last active August 29, 2015 14:21
Leaflet initial view helper
//Logs current map center and zoom level for use in map init options
//Use it to find that perfect intial view without having to use trial and error
map.on('dragend',getInit).on('zoomend',getInit);
function getInit() {
var c = map.getCenter();
console.log('center: [' + c.lat + ',' + c.lng + '],\nzoom: ' + map.getZoom());
}
@danicarrion
danicarrion / README.md
Last active January 12, 2016 15:08
Script that reads from a CartoDB table, geocode each row with Google's geocoder and put them back into CartoDB

This script reads a table fom CartoDB using the SQL API, geocodes one of its fields using Google's geocoder and updates the data on CartoDB.

If no valid credentials are provided for Google's geocoder, the free limits will apply.

TODO: multithread support