Skip to content

Instantly share code, notes, and snippets.

Dani Carrión danicarrion

  • Valladolid, Spain
Block or report user

Report or block danicarrion

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@danicarrion
danicarrion / explain.md
Last active Feb 11, 2020
Taller para el Open Space de WeCodeFest 2020
View explain.md
@danicarrion
danicarrion / proxy.py
Created Feb 2, 2018
Basic proxy that adds your CARTO API key to any requests and forwards them to CARTO
View proxy.py
import requests
from flask import Flask, request
BASE_URL = "https://my_account.carto.com" # Or CDN, or on-prem
API_KEY = "my_api_key"
VERIFY_SSL_CERT = True # Set to False if you don't want the proxy to verify CARTO's cert
app = Flask(__name__)
@danicarrion
danicarrion / index.html
Created Nov 21, 2016
Forward-all proxy for CARTO's password/token-protected named maps
View index.html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="https://cartodb-libs.global.ssl.fastly.net/cartodb.js/v3/3.15/themes/css/cartodb.css" />
<script src="https://cartodb-libs.global.ssl.fastly.net/cartodb.js/v3/3.15/cartodb.js"></script>
<title>Password-protected named map example</title>
</head>
<body>
<div id="map" style="height: 500px"></div>
@danicarrion
danicarrion / index.html
Last active Oct 17, 2016
CARTO + Openlayers + MVT example
View index.html
<!doctype html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>CARTO + Openlayers + MVT example</title>
<link rel="stylesheet" href="https://openlayers.org/en/v3.18.2/css/ol.css" type="text/css" />
<script src="https://openlayers.org/en/v3.18.2/build/ol.js"></script>
@danicarrion
danicarrion / index.html
Created Aug 18, 2016
CARTO + Tangram + GeoJSON example
View index.html
<!doctype html>
<!--
Tangram: real-time WebGL rendering for OpenStreetMap
http://github.com/tangrams/tangram
http://mapzen.com
-->
<html lang="en-us">
<head>
<meta charset="utf-8">
@danicarrion
danicarrion / index.html
Last active Sep 6, 2016
CARTO + Tangram + MVT example
View index.html
<!doctype html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>CARTO + Tangram + MVT example</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.0.0-rc.3/leaflet.css" />
<style>
@danicarrion
danicarrion / export.conf.example
Created Sep 2, 2015
Export tables from CartoDB as CSV, the_geom being converted to latitude/longitude
View export.conf.example
[cartodb]
account_name=
api_key=
table_name=
columns=
[file]
name=
@danicarrion
danicarrion / index.html
Last active Aug 29, 2015
Map with image overlay (GMaps)
View index.html
<!DOCTYPE html>
<html>
<head>
<!-- See Javier Arce's original for Leaflet: http://bl.ocks.org/javierarce/e7ec4b39013aa03ebd5e -->
<title>Map with image overlay | CartoDB.js</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<link rel="shortcut icon" href="http://cartodb.com/assets/favicon.ico" />
<style>
html, body, #map {
@danicarrion
danicarrion / startpy
Created Jun 11, 2015
Starts/stops a python script, storing its PID in /var/run, so that it can be run from monit
View startpy
#!/bin/bash
#
# startpy: starts/stops a python script, storing its PID in /var/run,
# so that it can be run from monit
#
# Scripts must be placed in a folder under /home/sm/scripts. Startpy
# will look in that folder for a script named after the folder (plus
# .py extension).
#
# (In the following example we'll assume a script test.py exists in
@danicarrion
danicarrion / index.html
Created May 20, 2015
createLayer with torque category layer
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<title>Torque category selector</title>
<link rel="stylesheet" href="http://libs.cartocdn.com/cartodb.js/v3/3.14/themes/css/cartodb.css" />
<style type="cartocss/text" id="cartocss">
Map {
You can’t perform that action at this time.