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 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
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 wit...
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 ...
title: “Service management utility for Mac OSX (launchctl helper)” tags: [“Development tool”, “Mac OSX”, “sysadmin”] date: 2013-08-31 13:03:00 -0400 —
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.
Wordpress’s Must Use Plugins are an easy way to include quick pieces of code that will always be included.
Caching full pages with Varnish can be hard, most applications use sessions, which sets a Cookie, which makes Varnish ignore all caching.
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
This post is part of: Guide to replicated LAMP stack hosting with failover
This post is part of: Guide to replicated LAMP stack hosting with failover
Motivations on building on your own hosting
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.
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.
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.
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
Joel Besada (@JoelBesada) did a jQuery plugin that lets you define custom scroll paths, including rotations and custom scrollbars.
Cache busting
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 security...
I was searching for inspiration for a good Git tutorial and I stumbled across a wonderful resource.
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
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:
As highlighted on Slashdot and Hacker News, the tests suites and the commit log of MySQL are not bundled with the opensource distribution.
Two scientists at the Harvard’s Wyss Institute have successfully stored a 700TB of data in DNA.
Amis de l’UdeM,
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.
Some javascript libraries are big and they pose a stress on the browser when they are loaded all at the same time.
As highligthed by MacLeans, the Advertising Research Foundation did an experiment showing that:
Here is a part of a documentary on decay that aired on BBC.
I needed to generate a unique code, suitable for URLs and somewhat short so it doesn’t scare the user.
Managing bashrc sucks
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 template...
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 files.
CMS often come with a .htaccess that has a RewriteRule like this:
The idea is to test that an email is sent by a contact form by inspecting the SwiftMailler Collector.
Email validation are traditionally done in three flavors. They have pros and cons but they are widely spread; let us go through them.