Skip to content

Instantly share code, notes, and snippets.

@abenrob
abenrob / index.html
Last active August 29, 2015 14:15
MapTime-Alpes - LeaftletGetting started with LeafletJS - Challenge Earthquakes
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="description" content="Getting started with LeafletJS - Challenge Earthquakes" />
<link href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" rel="stylesheet" type="text/css" />
<title>MapTime-Alpes - Leaftlet</title>
<style>
body {
padding: 0;
@abenrob
abenrob / tilemill_yosemite.md
Created November 25, 2014 16:59
TileMill OSX Yosemite

SI TU UTILISES OSX YOSEMITE

Option 1 :

  1. Télécharges TileMill comme d’hab

  2. Ouvres-le

  3. Vas dans “Updates Preferences”

Download signing key from Nginx.org:

wget -O - http://nginx.org/keys/nginx_signing.key | sudo apt-key add -

append the following to the end of the /etc/apt/sources.list file:

deb http://nginx.org/packages/ubuntu/ trusty nginx
deb-src http://nginx.org/packages/ubuntu/ trusty nginx
@abenrob
abenrob / plv8_startup
Created June 4, 2014 17:39
plv8 modules initiation function
create or replace function plv8_startup()
returns void
language plv8
as
$$
load_module = function(modname)
{
var rows = plv8.execute("SELECT code from plv8_modules " +
" where modname = $1", [modname]);
for (var r = 0; r < rows.length; r++)
#bash_profile location: ~/.bash_profile
# Setting for the UTF-8 terminal support
export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
@abenrob
abenrob / nginx_node_postgis.md
Last active September 7, 2015 21:33
Ubuntu 14.04 NGINX (postgresql) node.js

NGINX on Ubuntu 14.04 Trusty

Download signing key from Nginx.org:

wget http://nginx.org/keys/nginx_signing.key

Apply the key to your apt repos:

sudo apt-key add nginx_signing.key

####git-subtree make new empty dir for subtree

mkdir <newdir>
cd <newdir>
git init --bare

go to main project directory which contains dir you want to split into subtree

git subtree split --prefix=path/to/dir -b 
@abenrob
abenrob / README.md
Last active January 3, 2016 15:59 — forked from mbostock/.block
Zoom to bounding box

d3 map showing world admin boundaries. Hover state attibutes and zooming to bounding boxes. Topojson data of Natural Earth Admin 0 - Countries shapefile at 50m resolution.

@abenrob
abenrob / README.md
Last active January 3, 2016 13:09 — forked from mbostock/.block
@abenrob
abenrob / index.html
Last active January 28, 2016 06:59
d3 rank chart
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="style.css">
<body>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script>
//globals
var margin = {top: 10, right: 10, bottom: 10, left: 10},
width = 700 - margin.left - margin.right,