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
<script type='text/javascript'>
$(document).ready(function() {
$('#page_holder').pagify({
pages: ['accueil', 'regles', 'styll-life', 'zsp', 'born-in-ny', 'extra-large', 'info'],
animation: 'fadeIn',
animationSpeed: 1000,
animationOut: 'fadeOut',
animationOutSpeed: 950,
default: 'accueil',
cache: false,
<?php
// generation filter
$builder->add('generation_name', 'entity', array(
'class' => 'AramisSpsCoreBundle:VehicleModelGeneration',
'property' => 'name_lc',
'query_builder' => function(EntityRepository $er) use($this) {
return $er->createQueryBuilder('vmg');
->where('vmg.vehicleModel = ' . $this->vehicleModelId)
->orderBy('vmg.name', 'ASC');
@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
};