Skip to content

Instantly share code, notes, and snippets.

View trivoallan's full-sized avatar
💭
♫ Join us now and share the software; You'll be free, hackers ♫

Tristan Rivoallan trivoallan

💭
♫ Join us now and share the software; You'll be free, hackers ♫
View GitHub Profile
@trivoallan
trivoallan / gist:8c19c2f6f7c7dc7a5da7
Created July 17, 2014 08:12
La Pinacothèque à Bertier
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>La Pinacothèque à Bertier</title>
</head>
<body>
<outline text="projects" title="projects">
<outline text="pinacothèque" title="pinacothèque">
<outline type="rss" text="Collection Kangourou" title="Collection Kangourou" xmlUrl="http://collectionkangourou.blogspot.com/feeds/posts/default" htmlUrl="http://collectionkangourou.blogspot.com/"/>
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Tristan subscriptions in feedly Cloud</title>
</head>
<body>
<outline text="appz" title="appz">
<outline type="rss" text="Flynn" title="Flynn" xmlUrl="https://flynn.io/blog.xml" htmlUrl="https://flynn.io/blog"/>
<outline type="rss" text="symfony Project New Plugins" title="symfony Project New Plugins" xmlUrl="http://www.symfony-project.org/plugins/newest.rss" htmlUrl="http://www.symfony-project.org/plugins/"/>
@trivoallan
trivoallan / subl-installer.sh
Last active August 29, 2015 14:07
Sublime Text 3 local installer
#!/bin/bash
# Downloads Sublime Text 3 and installs it locally in user's home directory
# Better error reporting
function error_handler() {
echo "Error occurred in script at line ${1}"
echo "Line exited with status: ${2}"
}

Keybase proof

I hereby claim:

  • I am trivoallan on github.
  • I am trivoallan (https://keybase.io/trivoallan) on keybase.
  • I have a public key whose fingerprint is 56AF BA10 1A7A 2A17 EF69 9013 05FC E03F B639 73F9

To claim this, I am signing this object:

@trivoallan
trivoallan / elasticsearch.sls
Created October 24, 2014 14:51
Installation de deux versions de ES en parallèle sur une distribution .deb
elasticsearch.pkg.curl:
pkg:
- installed
- name: curl
openjdk-7-jre-headless:
pkg:
- installed
/tmp/elasticsearch.{{ pillar.elasticsearchVersion }}.deb:
<?php
ob_start();
$file->fpassthru();
$contents = ob_get_flush();
@trivoallan
trivoallan / mapreduce.js
Last active August 29, 2015 14:10
mapreduce.js
/*
* Aggrégation des données
*/
db.request.mapReduce(
function() {
key = this.idClient,
value = {
user_id : this.tagCommanderData.user_id,
dateCreated : this.dateCreated
};
/*
* Aggrégation des données
*/
db.request.mapReduce(
function() {
key = this.idClient,
value = {
user_id: this.tagCommanderData.user_id,
dateCreated: this.dateCreated
};
@trivoallan
trivoallan / defaults.php
Created January 21, 2015 10:05
En finir avec les E_NOTICE dues à l'accès à des clés de tableau inexistantes
<?php
// Ce tableau contient toutes les clés possibles
$defaults = array(
'key1' => null,
'key2' => 42,
'key3' => 'raoul'
);
// C'est le tableau qu'on récupére en entrée. Il contient un certain nombre des clés possibles
$input = array(