Skip to content

Instantly share code, notes, and snippets.

View jsanz's full-sized avatar
🗺️
Mapping

Jorge Sanz jsanz

🗺️
Mapping
View GitHub Profile
@jsanz
jsanz / index.html
Created August 25, 2015 17:18
CartoDB.js: create two sublayers from one input
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
<link rel="shortcut icon" href="http://cartodb.com/assets/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://libs.cartocdn.com/cartodb.js/v3/3.14/themes/css/cartodb.css" />
<style>
@jsanz
jsanz / mapproxy.yaml
Created March 12, 2012 14:52
Simple proxying of the Spanish PNOA service to get a WMS from their TMS
services:
demo:
kml:
tms:
wmts:
wms:
srs: ['EPSG:900913', 'EPSG:4258']
image_formats: ['image/jpeg', 'image/png']
md:
title: PNOA MapProxy
@jsanz
jsanz / mapproxy.yaml
Created March 30, 2012 08:55 — forked from nachouve/mapproxy.yaml
Simple proxying of the Spanish PNOA service to get a WMS from their TMS
services:
demo:
kml:
tms:
wmts:
wms:
srs: ['EPSG:900913', 'EPSG:4258']
image_formats: ['image/jpeg', 'image/png']
md:
title: PNOA MapProxy
@jsanz
jsanz / gist:2250545
Created March 30, 2012 10:05
mi ttytterc
#TTYtter settings
timestamp=%H:%M
#use ssl
ssl=1
#show replies in timeline
mentions=1
#Open images (with libcaca)
#avatar=gthumb %U&
avatar=wget %U -qO /tmp/avatar && img2txt -f utf8 /tmp/avatar
#Open URLs with default browser
@jsanz
jsanz / linkedin.md
Last active October 2, 2015 23:58
Linkedin reply templates

Linkedin reply templates

English - default reply template

Hi,

Have we met? I do not usually add to my network people I don't know without talking a little, know why you are interested in my profile, etc..

But it happens also I'm terrible with names so if we've met before, please I beg your pardon.

@jsanz
jsanz / brownie-de-chocolate.md
Created May 15, 2012 07:11
Brownie de chocolate, receta de Christophe

A petición popular, la receta del brownie de ayer :-).

  • calentar 1'30'' (micro-ondas) 250g chocolate + 250g mantequilla o margarina
  • a parte, mezclar 3 huevos XL + 300g azúcar
  • añadir la mescla de chocolate/mantequilla fundido
  • añadir 150g harina (+ nueces)
  • poner al horno precalentado 180ºc 25'
  • desmoldar caliente ...

a disfrutar :-D

@jsanz
jsanz / firma-ivan.txt
Created October 19, 2012 08:30
Firma correo al estilo de Iván
Aviso: Este e-mail es confidencial y no debería ser usado por nadie que no sea el destinatario original.
No se permite la reproducción mediante fotocopia, walkie-talkie, emisora de radioaficionado, satélite,
televisión por cable, proyector, señales de humo, código morse, braille, lenguaje de signos, taquigrafía
o cualquier otro medio. Bajo ningún concepto debe traducirse al francés este e-mail. Este e-mail no puede
ser ridiculizado, parodiado, juzgado en una competición, o leído en voz alta con un acento gracioso
llevando un bigote falso y/o cualquier tipo de sombrero, incluyendo pero no limitándose a pañuelos.
No inciten ni provoquen a este e-mail. Si está medicándose, puede experimentar nauseas, desorientación,
histeria, vómitos, pérdida temporal de la memoria a corto plazo y malestar general al leer este e-mail.
Consulte a su médico o farmacéutico antes de leer este e-mail. Todas las modelos descritas en este
e-mail son mayores de 18 años. Este e-mail se reserva el derecho de admisión. Si ha recib
@jsanz
jsanz / heapify.py
Created October 23, 2012 06:59 — forked from jul/heapify.py
Exact translation of an heap obfuscated algorithm (validating python syntax rules)
"""
A heap is a recipie to represent an array as a
binary tree.
A binary tree is a convenient structure for
manipulating ordered data
Said simply:
we implement a binary tree abstraction on top of an array.
this tree as the following properties:
any child value is smaller than its parent's value
left child is greater than right child.
@jsanz
jsanz / README.md
Last active November 24, 2015 19:27 — forked from andy-esch/README.md
Elections webinar
@jsanz
jsanz / README.md
Last active November 27, 2015 08:48
CartoDB.js: Custom infowindow

Example derived from the official demo but disabling the sanitization of the infowindow to allow custom uris to the Spotify app.

If you visit the original visualization the infowindow header is orange and the uri is sanitized and it doesn't work, but if you visit this page the infowindow is replaced by a new one with an orange header and the uris are not sanitized and work.