Profiling MySQL/MariaDB queries

If you ever face an optimization issue in MySQL or MariaDB and want to know how to measure/benchmark the differences in execution between two queries, you should definitely know about the set profiling=1; command. Here is how it works: mysql>…

More Details
Nginx Anti-DOS filter for Fail2Ban

We are currently trying out this Fail2Ban rule on one of our server, to block simple (but very upsetting) DOS attacks on Nginx automatically (after 30 seconds). New filter in /etc/fail2ban/filter.d/nginx-dos.conf: # Fail2Ban configuration file # # Generated on Fri…

More Details
Drupal 7 problem: Content edit tab doesn’t appear for user editor

In Drupal 7, there is a *very tricky* problem you might fall upon at some point. We did and because it’s not *really* a Drupal bug (although it could be considered as a usability bug), it’s worth writing down. The…

More Details
Prune a Mercurial branch

The manual is perfect for that… http://mercurial.selenic.com/wiki/PruningDeadBranches All you have to do is: hg heads Identify the branch you want to close (get the revision number, let’s say 951) hg update -C 951 hg commit –close-branch -m “This version never…

More Details
Create a view to search on content title in 7 steps in Drupal 7

I searched for this a long time just to find it was very easy to do, so I hope this helps you too. The objective of this short guide is to explain how to build a view in Drupal 7…

More Details
Creating a software RAID array on an already installed Ubuntu 11.04

Let’s say you got confused by a misleading fake-RAID feature on an HP Blade server and you decided to ignore that the Ubuntu installer was telling you it found 2 disks while it was supposed (if it was actual hardware…

More Details
PHP FastCGI hangs

Just as a self reminder, this blog post explains why php-cgi might hang/stop silently when your load increases, and how to fix it, where it explains (in short) that fast-cgi should have the parameter PHP_FCGI_MAX_REQUESTS should equal 1000 or more…

More Details
Reset mailman admin password

To reset a mailman admin password on Debian, the easiest way is to locate the mailman’s proper bin directory (use dpkg -L mailman), generally: /usr/lib/mailman/bin There, you’ll find an executable script called change_pw. Use this one. If you want to…

More Details
Increasing battery working time on Lenovo W500

I’m a happy user of a Lenovo W500 but I had a very hard time getting anything more than 1h30 battery time, even with a brand new 9-cell battery (this one got me just 1h45 when using low screen brightness…

More Details
Simple Drupal 6 WYSIWYG

When building up a new Drupal 6 site now, we always download and enable the following modules to enable WYSIWYG (What You See Is What You Get) edition: wysiwyg we download the ckeditor sources imce imce_wysiwyg Then we: enable wysiwyg,…

More Details