Skip to content

Instantly share code, notes, and snippets.

View faboo03's full-sized avatar

Fabien Rondeau faboo03

  • Stereograph
  • Lille
View GitHub Profile
@faboo03
faboo03 / gist:4656100
Created January 28, 2013 14:51
Exemple uasort
uasort(
$returnArray,
function ($a, $b) {
return $a["total"] < $b["total"] ? 1 : -1;
}
);
@faboo03
faboo03 / deploiement-preprod.sh
Created February 20, 2013 09:52
Déploiement dev
#!/bin/sh
echo "### Mise | jour de la préprod ###"
echo "##################################"
echo "Indiquez le nom de la version (Ex : 0.6)"
read CURRENT_VERSION
svn sw https://cronos.stadline.com/repos/iepeiv2/tags/$CURRENT_VERSION ./current
echo "### Export ###"
@faboo03
faboo03 / access-log-parse.sh
Last active December 14, 2015 03:49
Parse Access Log and get all access lines
# Regarde toutes les URLS appellées :
grep -a access.log |awk '{print $8}'| sort |uniq -c | sort -rn
# Regarde toutes les URLS appellées pour le sous domaine widgets
grep -a access.log -e ^widget.tournikoti.com |awk '{print $8}'| sort |uniq -c | sort -rn
@faboo03
faboo03 / deploiement-preprod.sh
Last active December 14, 2015 06:09 — forked from alex-pex/deploiement-preprod.sh
Ajout de la gestion de la mise en ligne de branche de Release
#!/bin/sh
echo "### Mise | jour de la préprod ###"
echo "##################################"
echo "déploiement d'une branche de release"
echo "##################################"
echo "Branche ou Tag ?"
read answer
@faboo03
faboo03 / init.js
Created March 7, 2013 13:31
Add Tooltip to Donuts
var plot1 = $.jqplot('plotId', [data], {
seriesDefaults: {
renderer:$.jqplot.DonutRenderer,
rendererOptions:{
highlightMouseDown : false,
highlightMouseOver: true,
sliceMargin: 0,
innerDiameter: 165,
startAngle: -90,
shadow: false
@faboo03
faboo03 / EntityIdentifierType.php
Created February 26, 2015 13:34
ModelTransformer
<?php
namespace Core\MediaBundle\Form\Type;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Core\MediaBundle\Form\DataTransformer\EntityToIdentifierTransformer;
use Doctrine\Common\Persistence\ObjectManager;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
@faboo03
faboo03 / README.md
Created June 5, 2015 09:43
Add autocomplete for SF2 Console

Installation

Add console to your path and copy the file console_autocomplete.sh to /home/$USER and add it to source

then run this

echo 'PATH="./app:./bin:$PATH"' >> ~/.bash_aliases
echo . ~/.console_autocomplete &gt;&gt; ~/.bash_aliases
@faboo03
faboo03 / boundingBox.php
Last active August 5, 2020 21:57
boundingBox.php code sample
<?php
interface iBoundingBox {
/**
* Récupère les coordonnées de la BoundingBox
*/
public function getCoords();
/**
* Fusionne 2 BoundingBox et retourne une BoundingBox qui contient les 2 précédentes.
*/
@faboo03
faboo03 / test.html
Created January 12, 2016 20:46
Hello!
<h1 id="symfony-2-tp-anonymousgift">Symfony 2 : TP AnonymousGift</h1>
<h2 id="sommaire">Sommaire</h2>
<ul>
<li>Présentation du contexte</li>
<li>Analyse UML <br>
<ul><li>Flow</li>
@faboo03
faboo03 / test.md
Created January 12, 2016 20:48
Hello!

Symfony 2 : TP AnonymousGift

Sommaire

  • Présentation du contexte
  • Analyse UML
    • Flow
    • Entités
  • User