Skip to content

Instantly share code, notes, and snippets.

View mickaelandrieu's full-sized avatar
Working from home

Mickaël Andrieu mickaelandrieu

Working from home
View GitHub Profile
View template.txt
[Prénom et nom]
[Votre adresse]
[Code postal, Ville]
[Adresse e-mail]
[Prénom et nom du député]
[Adresse du bureau du député]
[Code postal, Ville du bureau du député]
mickaelandrieu /
Last active May 3, 2023 21:40
Install phantomjs/casperjs on GNU/Linux
# `` sudo sh ``
# Developement environnement
# Important: use 'i686' instead of 'x86_64'
# For stable environnement see also :
echo Installation de Phantomjs
cd /usr/local/share
sudo wget
mickaelandrieu / quotes_json.js
Created November 26, 2013 12:50
Scrap a website with CasperJs, JSON output.
View quotes_json.js
var links = [];
var quotes = [];
var tempUrl = [];
var infos = [];
var maxLinks = 10;
var firstUrl = ',&sort=user_rating,desc&start=1&title_type=tv_infoss';
var newUrl;
var x = require('casper').selectXPath;
mickaelandrieu / index.php
Created August 9, 2018 19:21
Contrôleur frontal standard Symfony 4
View index.php
use App\Kernel;
use Symfony\Component\Debug\Debug;
use Symfony\Component\Dotenv\Dotenv;
use Symfony\Component\HttpFoundation\Request;
require __DIR__.'/../vendor/autoload.php';
// The check is to ensure we don't use .env in production
mickaelandrieu /
Last active February 8, 2023 20:20
Migration guide to Symfony 3 LTS

Let's migrate a Symfony 2.8 LTS application to Symfony 3 LTS

Handle deprecations

First of all, ensure you don't have any deprecated!

The Symfony documentation explains it well, but let's sum up:

  • install the phpunit bridge ($ composer require --dev symfony/phpunit-bridge)
  • also check all your pages using web profiler and be ensure there is no deprecation error handled
  • found errors and need help about how to fix it ? I did a sort of guide.
import geopandas as gdp
dep971 = gdp.read_file('./ZFU/ZFU_Dep971_Scan25_W84.shp')
dep972 = gdp.read_file('./ZFU/ZFU_Dep972_Scan25_W84.shp')
dep973 = gdp.read_file('./ZFU/ZFU_Dep973_Scan25_W84.shp')
dep974 = gdp.read_file('./ZFU/ZFU_Dep974_Scan25_W84.shp')
metropole = gdp.read_file('./ZFU/ZFU_FRM_Scan25_L93.shp')
# convert metropole to lon/lat system
dep971 = dep971.to_crs('EPSG:4326')
from pyproj import Transformer
# EPSG:2154 = Lambert 93 (french projection system)
# EPSG:4326 = WGS 84 (lon/lat)
class CoordinatesEncoder:
def convert(x: float, y: float):
transformer = Transformer.from_crs("EPSG:2154", "EPSG:4326", always_xy=True)
View docker-compose.yml
version: "2"
image: linuxserver/plex:latest
container_name: plex
- PUID=1000
- PGID=1000
- VERSION=docker
mickaelandrieu /
Last active April 26, 2022 11:56
Complete migration guide from Symfony 2.3 LTS to Symfony 2.7 LTS

From Symfony 2.3 to Symfony 2.7: the complete guide


  • assume your code doesn't use any deprecated from versions below Symfony 2.3
  • update dependencies from 2.3 to 2.7
  • do not support "deprecated", be "Symfony3-ready"
  • list tasks component by component, bundle by bundle.
mickaelandrieu / webservice.js
Created October 11, 2013 20:45
Use casperJs as a Webservice
View webservice.js
/* from
//define ip and port to web service
var ip_server = '';
//includes web server modules
var server = require('webserver').create();
//start web server
var service = server.listen(ip_server, function(request, response) {