Skip to content

Instantly share code, notes, and snippets.

View llaine's full-sized avatar
🚀

Louis Lainé llaine

🚀
View GitHub Profile
@llaine
llaine / elastic.sh
Last active November 27, 2015 17:02
Elasticsearch french fake index creation for mock and test
# Index creation with settings
curl -XPUT localhost:9200/geoloc -d '{
"settings": {
"index": {
"analysis": {
"filter": {
"french_elision": {
"type": "elision",
"articles": [ "l", "m", "t", "qu", "n", "s",
"j", "d", "c", "jusqu", "quoiqu",
@llaine
llaine / index.html
Created May 19, 2015 12:22
Matrix animation
<canvas id="c"></canvas>
@llaine
llaine / deploy.sh
Created June 13, 2015 17:55
Meteor deploy script
#!/bin/bash
# Global var
readonly APACHE_DIR="/home/nicetomateyou"
readonly SERVER_DIR="$APACHE_DIR/bundle/programs/server"
readonly ARGC="$#"
readonly VERSION="$1"
readonly TARGET="prod"
@llaine
llaine / bad-tree.sh
Last active August 29, 2015 14:24
medium.com article pieces of code.
$ app/client : tree . | more
|-- account
| | -- html
| | | -- recoverPwd.html
| | | -- updateProfile.html
| | | -- account.html
| | -- js
| | | -- recoverPassword.js
| | | -- profileInfos.js
$ app/client : tree . | more
|-- account
| | -- password
| | | |-- recover
| | | | | -- recover.html
| | | | | -- recover.js
| | | | | -- recover.less
| | | | | -- utils
| | | | | | -- helper.js
@llaine
llaine / gist:7819d4bf764c18d5d8ca
Created July 24, 2015 09:00
recommendedReasonPhrases
[recommendedReasonPhrases:protected] => Array
(
[100] => Continue
[101] => Switching Protocols
[102] => Processing
[200] => OK
[201] => Created
[202] => Accepted
[203] => Non-Authoritative Information
[204] => No Content
@llaine
llaine / gist:67ac1cf217966ffbad7d
Created July 26, 2015 10:39
Meteor france API

Récupérer l'ID de la ville correspondante.

var input = "Pessac"

http://www.meteofrance.com/mf3-rpc-portlet/rest/lieu/facet/pluie/search/input

Renvoie un truc du style :

[ {
  "id" : "333180",
@llaine
llaine / td.pl
Last active October 19, 2015 13:52
TD de prolog
% http://dept-info.labri.u-bordeaux.fr/~musumbu/Expert/td2.pdf
/*
***************** Les faits *******************
Arguemnts du predicat bio :
bio(enfant, sexe, annee_naissance, annee_mort, pere, mere)
*/
bio(louis13, h, 1601, 1643, henri4, marie_medicis).
bio(elisabeth_France, f, 1603, 1644, henri4, marie_medicis).
@llaine
llaine / bash.sh
Created October 20, 2015 09:29
Rebase example 1
$ git log --pretty=format:"%h %s" HEAD~3..HEAD
adcf4a6 Adding navbar (Part 3)
0cdff26 Adding navbar (Part 2)
0ce7553 Adding navbar (Part 1)
@llaine
llaine / interactive-rebase.sh
Last active October 20, 2015 10:14
git rebase -i on the commit we want to change
$ git rebase -i a860a43~
1 edit a860a43 Add footer + rename header menus
2 fixup 1e2ac88 Add style.css (footer)
3 pick c09d958 Add breadcrumb
4 pick 0e37c70 Add jumbotron