Profile cover photo
Profile photo
Sébastien Lavoie
102 followers
102 followers
About
Sébastien's posts

Post has attachment
Override Doctrine ODM mapping for Symfony FOSUserBundle
In Symfony Cookbook How to Override any Part of a Bundle , it is written that you cannot override entity mappings and only attributes can be modified in superclasses. However, it is possible to hack you way through and  register an Event Listener  on loadCl...

Post has attachment
Preventing cache stampede when using Doctrine Cache
Wikipedia has short and clear article on the matter, cache stampede can be quite deadly, especially when you are rebooting your server, clearing your cache or having a midnight maintenance (cronjob). Cache stampede, put simply, is when your process is tryin...

Post has attachment
Load Doctrine Fixtures when using Migrations in Symfony
Using app/console doctrine:migrations:migrate  is really easy and trouble free for everybody, but those tables are often empty and they need some data to be of any use. A common example is a table of countries or user roles. However, once a project is start...

Post has attachment
MySQL 5.7 and Wordpress problem
If you upgrade to MySQL 5.7, you may encounter bugs with legacy software. Wordpress, which I also consider some kind of legacy software, does not handle this very well with its default settings. You may encounter the "Submit for review" bug where you cannot...

Post has attachment
Starting a text editor from inside a Virtual Machine
Using Vagrant, Docker or other virtual development environment is becoming quite popular. However, a drawback of this is that you cannot start a visual text editor on your main machine because heh, the files are not there. Purist may tell you that you shoul...

Post has attachment
Creating a static private network on VMWare Fusion with Ubuntu
This tutorial is using VMWare Fusion 7, Ubuntu 14.04.1 server and OSX 10.9 The goal here is to create a private network shared with selected VMs and the host, while offering NATing to connect to the Internet. VMWare offers some  documentation , which works ...

Post has attachment
Adding newlines in a SQL mysqldump to split extended inserts
The official  mysqldump  supports more or less two output styles: separate INSERTs (one insert statement per row) or extended INSERTs (one insert per table). Extended INSERTs are much faster, but MySQL write them all in one line, the result being a SQL very...

Post has attachment
Using PHP’s mb_detect_encoding to cleanup your data
Ever heard of iso-8859-1 ? Yeah… that nightmare… With it, my name ends up more often than not… Sébastien. The computers gurus came up one day with UTF-8  and all our problems should have been solved; one encoding to rule them all. Sweet, let’s all switch t...

Post has attachment
Simple tutorial to demonstrate the use of CSS to style custom checkboxes without javascript. Uses a Font Awesome icon.

Post has attachment
Simple custom CSS checkboxes with Font Awesome
Browsers make it notoriously hard to modify the default form elements like dropdowns and checkboxes. For ages, the only way to add a custom style was to use images and CSS Checkbox  gives a very good example of this. However, using images is more of a hack ...
Wait while more posts are being loaded