Skip to content

Instantly share code, notes, and snippets.

View mathieue's full-sized avatar

Mathieu Elie mathieue

View GitHub Profile
@mathieue
mathieue / bulk-import-sample.json
Last active October 7, 2017 07:46
prez d3.js + elasticsearch on bordeaux open data @BordeauxJS
{ "index" : { "_index" : "musees", "_type" : "capc"} }
{"Auteur" : "AA BRONSON (TIMS Mickael, dit)", "Titre" : "Jorge, February 3, 1994", "Date" : 2000, "Domaine" : "Photographie", "Deno" : null, "MatSuppTech" : "Impression sépia sur mylar", "Description" : null, "Dimensions" : "3 x (180,5 x 91,5) cm", "Column 10" : null, "Column 11" : null, "Column 12" : null, "Column 13" : null, "Column 14" : null, "Column 15" : null, "Column 16" : null, "Column 17" : null, "Column 18" : null, "Column 19" : null, "Column 20" : null, "Column 21" : null }
{ "index" : { "_index" : "musees", "_type" : "capc"} }
{"Auteur" : "ABSALON (MEIR Eshel, dit)", "Titre" : "Cellule (3)", "Date" : 1991, "Domaine" : "Sculpture", "Deno" : null, "MatSuppTech" : "Bois, carton, Plexiglas, tubes fluorescents, peinture glycerophtalique", "Description" : null, "Dimensions" : "133x240x161 cmPorte : 34 x 179 x 25 cm", "Column 10" : null, "Column 11" : null, "Column 12" : null, "Column 13" : null, "Column 14" : null, "Column 15" : null, "Column 16" :
@mathieue
mathieue / sentinel
Created February 4, 2013 16:19
redis sentinel startup script
#!/bin/bash
### BEGIN INIT INFO
# Provides: redis sentinel
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Starts redis sentinel
# Description: Starts redis sentinel using start-stop-daemon
### END INIT INFO
curl -X POST 'http://localhost:9200/cours/note' -d '{"nom": "Eric","ville":"Paris","latlon": "48.864716,2.349014","discipline":"Mathematiques","note":12}'
curl -X POST 'http://localhost:9200/cours/note' -d '{"nom": "Martin","ville":"Paris","latlon": "48.864716,2.349014","discipline":"Mathematiques","note":13}'
curl -X POST 'http://localhost:9200/cours/note' -d '{"nom": "Patrick","ville":"Paris","latlon": "48.864716,2.349014","discipline":"Mathematiques","note":9}'
curl -X POST 'http://localhost:9200/cours/note' -d '{"nom": "Sebastien","ville":"Paris","latlon": "48.864716,2.349014","discipline":"Mathematiques","note":12}'
curl -X POST 'http://localhost:9200/cours/note' -d '{"nom": "Stephane","ville":"Bordeaux","latlon": "44.836151,-0.580816","discipline":"Mathematiques","note":11}'
curl -X POST 'http://localhost:9200/cours/note' -d '{"nom": "Francois","ville":"Bordeaux","latlon": "44.836151,-0.580816","discipline":"Mathematiques","note":18}'
curl -X POST 'http://localhost:9200/cours/note' -d '{"nom": "S
{
"template": "logstash-*",
"settings" : {
"number_of_shards" : 1,
"number_of_replicas" : 0,
"index" : {
"store" : { "compress" : { "stored" : true, "tv": true } }
}
}
}
@mathieue
mathieue / make-d3-node-no-appends.js
Created November 11, 2013 10:02
make a d3.js element node without appending (create)
var detached = d3.select(document.createElement("div"));
@mathieue
mathieue / install_mosh.mkd
Created October 29, 2013 13:21
install mosh on ubuntu

install mosh on ubuntu

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:keithw/mosh
sudo apt-get update

sudo apt-get install mosh

@mathieue
mathieue / install_mosh.mkd
Created October 29, 2013 13:16
install mosh on ubuntu : remote shell on steroids !

install mosh on ubuntu

sudo apt-get install python-software-properties sudo add-apt-repository ppa:keithw/mosh sudo apt-get update sudo apt-get install mosh

@mathieue
mathieue / do-it.sh
Last active December 22, 2015 02:59
graphite + statsd install with chef-solo
# install chef-solo one line !
curl -L https://www.opscode.com/chef/install.sh | bash
# cookbooks have their rep: check the dir name == cookbook name
mkdir -p /opt/cookbooks
git clone https://github.com/hw-cookbooks/graphite
git clone https://github.com/opscode-cookbooks/apache2.git
git clone https://github.com/opscode-cookbooks/python.git
git clone https://github.com/opscode-cookbooks/runit.git
git clone https://github.com/opscode-cookbooks/memcached.git
####################################
# BASIC REQUIREMENTS
# http://graphite.wikidot.com/installation
# http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/
####################################
sudo apt-get update
wget http://launchpad.net/graphite/1.0/0.9.10/+download/graphite-web-0.9.10.tar.gz
wget http://launchpad.net/graphite/1.0/0.9.10/+download/carbon-0.9.10.tar.gz
wget http://launchpad.net/graphite/1.0/0.9.10/+download/whisper-0.9.10.tar.gz
@mathieue
mathieue / logstash.sh
Last active December 15, 2015 22:58
logstash init.d
#! /bin/sh
### BEGIN INIT INFO
# Provides: logstash-shipper
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start daemon at boot time
# Description: Enable service provided by daemon.