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 super...
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 super...
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 o...
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 o...
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...
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 ...
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 hos...
The official mysqldump supports more or less two output styles: separate INSERTs (one insert statement per row) or extended INSERTs (one insert per table). E...
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...
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 ...
Heartbleed Recently the Heartbleed bug came to light. It is a bug in the OpenSSL library that causes information to leak from the server. It is an undetecta...
I thought I would go for a change and talk about some Bitcoin mining. There have been some big hype around it. Some large companies are making top dollar wi...
A couple months ago, I did a comparison of different distributed filesystems. It came out that GlusterFS was the easiest and most feature full, but it was sl...
On Reddit, I recently stumbled upon DynoSRC which allows to serve only a differential Javascript file to your users. The concept is pretty amazing, but I fin...
So you combined all your Javascript files in the hope it will speed up page loads ? Well for sure the download will be faster, but the browser still needs to...
Having menus that gracefully adapt to the size of your screen can be troublesome. Inspired by the collapsible menu of Bootstrap, here is a pure CSS implement...
I have only been in the Web industry for 5-6 years but I am already a bit sceptical when giving an interview. Some people are so good at talking about stuff ...
Having dealt with services mostly on Linux, I grew accustomed to type service php restart. On Mac, this is more like: launchctl unload ~/Library/LaunchAgen...
Small script that loops through all branches and tags of all projects in a Gitlab installation and if it contains a composer.json, adds it to an index. This...
Wordpress’s Must Use Plugins are an easy way to include quick pieces of code that will always be included. While having my way with Composer and Composer In...
Caching full pages with Varnish can be hard, most applications use sessions, which sets a Cookie, which makes Varnish ignore all caching. When sessions are ...
I was working with a Percona XtraDB Cluster and I noticed that even though it supports MyISAM replication, it is statement based so the PRIMARY KEY is not pr...
This post is part of: Guide to replicated LAMP stack hosting with failover The core concept of choosing a filesystem for a Web hosting cluster is to elimi...
This post is part of: Guide to replicated LAMP stack hosting with failover Beside choosing Linux vs Mac or Windows, the OS should not impact your users, it...
This post is part of: Guide to replicated LAMP stack hosting with failover The first step of building a hosting service is to choose your provider. Each sys...
Motivations on building on your own hosting For my company, I started to think about offering a hosting service. Cheap solutions exist like 1and1.com ...
PHP has no built-in base URL variable. In all the mess that is the $_SERVER variable, there is nothing that will tell you the base URL for your website. Thi...
Have you ever had a project manager? You know, the kind of person that comes to bug you about your timesheet not being properly done and how important it is?...
To generate a unique integer ID in Puppet, we can use the hostname and convert is to base 10 using a erb inline template.
I was working on a shared hosting project and I noticed the permissions were getting a bit complicated. For each website: Each user must have read/write pe...
When doing low-priority tasks like backups are fixing permissions on a cronjob, it is a good idea to modify the niceness of the script. By using ionice and r...
At my office, we needed a new router. With more than 50 devices that are quite heavily using the network, we we crushing our basic personal router. After so...
Shared caches are pretty strict when it comes to caching or not a request. This is good, otherwise it would cache requests that are not meant to be cached. ...
When working with shared caches like Varnish or Nginx, cookies will kill everything you are trying to do. The idea is that since a cookie can be used by the...
loripsum.net describes itself as “The ‘lorem ipsum’ generator that doesn’t suck”. It is the same text you are used to see over and over except that it is dec...
I have been using LESS (and before SCSS) and I enjoy it, but I have to admit that I was spoiled by Symfony, Twig and Assetic that compile them automatically ...
Twitter Bootstrap is awesome to get started quickly on a custom layout. It had a lot of features that are very good best-practices like intuitive colours for...
PNG format for favicons are supported by most browsers, but as you are all aware, the current state of the Web implies we must not only develop for “most bro...
I often have to deploy several config files that are very similar. Things like Apache VirtualHost and PHP FPM pools. The solution to this kind of problem is ...
The plus side of using a public CDN It is becoming common practice to use public CDNs to host some assets like jQuery and Bootstrap. The advantage is huge:...
Joel Besada (@JoelBesada) did a jQuery plugin that lets you define custom scroll paths, including rotations and custom scrollbars. The technology is not v...
Cache busting Cache busting is to rewrite a URL for an asset (JS, CSS, images, etc) so that is unique. This way, you can cache them for as long as you want...
It is common knowledge that md5 is not secure for password hashing. It is almost worst than plaintext because it may falsly induce the impression of securit...
I was searching for inspiration for a good Git tutorial and I stumbled across a wonderful resource. Sure, you can take a week off and read the official Git ...
To update Drupal modules, you need to download manually all modules and this can quickly become tedious. Especially if you have multiple modules and Drupal i...
When changing DNS settings, the propagation can take from 15 minutes to two days. Clients and bosses are usually not very fond of this principle so it is oft...
Regular expressions are powerful, yes. They should not be used for everything, especially not HTML. HTML is not a regular language. As soon as you need some ...
Starting to build websites can be very hard, keeping up with the technology is a must and building cross-browsers is a daily crisis. A lot of great resources...
So, 4 years and a half after having started my bachelor degree at the University of Montreal in Computer Science, I am done. It has been a long and painful p...
Ubuntu comes bundled with UFW, which is an interface to iptables. This is basically a very lightweight router/firewall inside the Linux kernel that runs way ...
Nginx comes with a rather small set of mime types compared to a default Linux system Linux uses a glob pattern to match a filename while Nginx matches only ...
ElasticSearch is a powerful, yet easy to use, search engine based on Lucene. Compared to others, it features a JSON API and wonderful scaling capabilities vi...
There is many reasons to be needing a machine available publicly: Developing a Facebook App Developing an OAuth authentication Make a quick showcase for you...
As highlighted on Slashdot and Hacker News, the tests suites and the commit log of MySQL are not bundled with the opensource distribution. Oracle has an his...
Two scientists at the Harvard’s Wyss Institute have successfully stored a 700TB of data in DNA. To give you an idea of how big this is, it wou...
Amis de l’UdeM, L’interface de visualisation de l’horaire des étudiants est vraiment à exploser de larmes Voici une solution pour convertir le tout en .ic...
For more than a year, some influent PHP programmers of the most active of the most active projects in the community have been working on coding standards. T...
Some javascript libraries are big and they pose a stress on the browser when they are loaded all at the same time. Most of these libraries suggest to load t...
As highligthed by MacLeans, the Advertising Research Foundation did an experiment showing that: A blank banner ad received more clicks than the average Face...
Here is a part of a documentary on decay that aired on BBC. The part I am talking about is at 1:03:45 and demonstrates a slime mold searching for its food, ...
I needed to generate a unique code, suitable for URLs and somewhat short so it doesn’t scare the user. Doing md5(microtime()) is nice but it is 32 chars lon...
Managing bashrc sucks We all have our nice little bashrc that we are proud of. It tests for files, programs and terminal features, detect your OS ve...
Quite a usual task is to dump a database to do backups. You may even want to do this in a cronjob to snapshots, etc.
Wordpress has the nice habit of storing every URL with its full path in the database. You sure can hardcode the HOME_URL and SITE_URL in the wp-config.php bu...
This is in no way a robust solution for deploying a real web hosting infrastructure, but sometimes, you just need basic templates. I use this simple templ...
One of the most annoying things with being able to see all files in the terminal is that… you see all the files. That includes backups, swap and temp file...
CMS often come with a .htaccess that has a RewriteRule like this: # RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ app.php [QSA,L] Th...
The idea is to test that an email is sent by a contact form by inspecting the SwiftMailler Collector. We generate a fake unique content and loop through all...
Email validation are traditionally done in three flavors. They have pros and cons but they are widely spread; let us go through them.