Package code in a PHP archive: PHAR

In this article, I show how to group its code in a PHP Phar archive. This step a little complicated, is now greatly facilitated by tools available on Github. I illustrate here, the use of clue/phar-dial. Read the post

Tip to replace text easily in VIM equivalent to Ctrl + F

Vim is a great editor on Linux, but unfortunately the usual keyboard shortcuts such as Crtl + F to replace text does not exist. In this tip I explain the command to make a text replacement in VIM. Read the post

How to colorize your MySQL or MariaDB client on linux

In this article I present you a config which allows to put the client MySQL / MariaDB in color to facilitate the reading of the results of your SQL queries. Read the post

Use wildcard to grant rights to table with MySQL and MariaDB

The attribution of right in MySQL and MariaDB is sometimes a puzzle especially if one wishes to have a control by table for a user. It is possible to use a wildcard in the Grant command but its syntax is not very explicit. Read the post

Configuration to stop typing MySQL / MariaDB passwords

Have you ever thought about using the .my.cnf configuration file to make it easier to connect to your MySQL or MariaDB databases? This configuration is very useful when you have to manage several databases and / or several servers. I propose you a presentation of what we can do with it in this article. Read the post

Which format use to store dates in database with MySQL / MariaDB?

There are several ways to store dates in database, the choice is not so simple, especially if you need the timezone. In this article I explain the different solutions with their advantages and disadvantages. Read the post

RabbitMQ no longer loses message with the use of Alternate Exchange and fanout

Posting a message in RabbitMQ is very easy, unfortunately RabbitMQ does not provide any feedback on the success or failure of the delivery in a queue. A simple typo in the routing key and the message will be lost forever without being informed. The Alternate Exchange option allows you to retrieves these "lost" messages in a specific queue. Read the post

Use linux account to get secure connection to MySQL and MariaBD without password

No need to remember your password to connect to a linux server, SSH keys provide authentication. We can have the same thing on MySQL and MariaDB. With a plugin, the database server trusts the credentials of the linux system, you only need mysql account with the same name as the linux account and the password disappears from the connection. It is ideal on a development server with multiple users and it greatly facilitates the management of accounts, even if we forget to delete the mysql account, deletion of the linux account is enough. Read the post

Backup shell script for MySQL databases

Having a strategy of backup information is really important. We tend to neglect it and think about it after the first loss of information. Here is my backup script of my MySQL databases. Read the post

Use Elasticsearch with Symfony Framework and elasticsearch-php library

Elastic provides a light weight PHP library: elasticsearch-php to connect to Elasticsearch cluster. This Library is an API client with all possible options. It's light weight and lets developer chose implementation to use it. It's a very good alternative to Elastica and his abstraction layer. On this blog I'm using elasticseach-php with Twig to manage my indices and query Elasticsearch. Read the post