Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Mickaël Andrieu mickaelandrieu

🏠
Working from home
View GitHub Profile
@mickaelandrieu
mickaelandrieu / upgrade_to_symfony3-lts.md
Last active Jan 18, 2023
Migration guide to Symfony 3 LTS
View upgrade_to_symfony3-lts.md

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.
View docker-compose.yml
version: "2"
services:
plex:
image: linuxserver/plex:latest
container_name: plex
environment:
- PUID=1000
- PGID=1000
- VERSION=docker
volumes:
@mickaelandrieu
mickaelandrieu / upgrade2.3-to-2.7.md
Last active Apr 26, 2022
Complete migration guide from Symfony 2.3 LTS to Symfony 2.7 LTS
View upgrade2.3-to-2.7.md

From Symfony 2.3 to Symfony 2.7: the complete guide

Objectives

  • 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
mickaelandrieu / webservice.js
Created Oct 11, 2013
Use casperJs as a Webservice
View webservice.js
/* from http://stackoverflow.com/questions/15852987/casperjs-passing-data-back-to-php/16489950#16489950
//define ip and port to web service
var ip_server = '127.0.0.1:8585';
//includes web server modules
var server = require('webserver').create();
//start web server
var service = server.listen(ip_server, function(request, response) {
View better_correlation_maps.py
import pandas as pd
df = pd.read_csv('https://raw.githubusercontent.com/ageron/handson-ml/master/datasets/housing/housing.csv')
corr = df.corr()
corr.style.background_gradient(cmap='RdBu', vmin = -1, vmax = 1)
@mickaelandrieu
mickaelandrieu / install.sh
Last active Jun 9, 2021
Install phantomjs/casperjs on GNU/Linux
View install.sh
#!/bin/bash
# `` sudo sh install.sh ``
# Developement environnement
# Important: use 'i686' instead of 'x86_64'
#
# For stable environnement see also : https://gist.github.com/mickaelandrieu/6312724
echo Installation de Phantomjs
cd /usr/local/share
sudo wget https://phantomjs.googlecode.com/files/phantomjs-1.9.2-linux-x86_64.tar.bz2
@mickaelandrieu
mickaelandrieu / clink_prompt.lua
Created Mar 27, 2017
My config for cmder prompt
View clink_prompt.lua
@mickaelandrieu
mickaelandrieu / index.php
Created Aug 9, 2018
Contrôleur frontal standard Symfony 4
View index.php
<?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
View article.markdown

Les problèmes essentiels de jQuery

Cet article fait suite à la discussion entre Metal3d et Mathieu Robin.

Saluons d'abord l'article de metal3d, qui pose enfin des questions intéressantes après un article écrit trop tôt qui soulignait surtout les difficultés qu'il avait en découvrant jQuery et en essayant de l'utiliser comme Mootools (ce qui ne peut bien sûr pas fonctionner).

Cependant, on sent bien dans cet article que les problèmes fondamentaux commencent à être touchés sans toutefois être exactement saisis. Laissez-moi vous présenter mon point de vue.

La peur des natives

View circuit.php
<?php
use Resiliency\MainCircuitBreaker;
use Resiliency\Systems\MainSystem;
use Resiliency\Storages\SimpleArray;
use Resiliency\Clients\SymfonyClient;
use Symfony\Component\HttpClient\HttpClient;
$client = new SymfonyClient(HttpClient::create());