Google Contacts (the old version) allows you to import VCards, but you will have to import them one by one, this is clearly not very practical if you have more than 3 contacts that you want to import (you lazy!). Fear nothing, there is an easy workaround, you’ll merge your vCards before importing them, here’s how you… Continue reading How to easily import multiple vCards into Google Contacts
Refactoring code with the command line (files, folders and possibly variables)
These are a few commands I use in situations where I can’t use Eclipse for refactoring my code, you can use them by replacing from and to with the names you want. No need to remind you to take backups to prevent irreversible loss of data.
Git: How to revert changes in a single file or in all files
If you have modified or deleted a file by mistake on a git tracked project, you can still revert your action and reset the file like this:
Heberjahiz réveille-toi on est en 2013
N’achetez surtout pas votre nom de domaine chez Heberjahiz, ne faites pas la même erreur que moi! Voici mon histoire avec Heberjahiz Le 11 mai 2013: C’ést un samedi, j’achète un nom de domaine .ma en ligne sur le site de la société, je paye instantanément avec PayPal, après quelques secondes, je reçois des courriels… Continue reading Heberjahiz réveille-toi on est en 2013
Drupal Commerce: Redirect to cart after adding a product
Sometimes, you want the visitor to go directly to the cart, instead of staying in the same page and having a success message telling him that his product has been added to the cart.
Joomla 3.0 – Fix Application Instantiation Error
Everything went smoothly as usual in my local machine, but as soon as I moved the website to the client server, it wouldn’t run normally, instead it gives me the dreaded error message: Error displaying the error page: Application Instantiation Error After a small search on Google, I found that all people were saying to… Continue reading Joomla 3.0 – Fix Application Instantiation Error
PHP: empty() is your friend
It’s easy to miss things that are very obvious, this is the proper way to check that a variable has a value that is not nothing (null, 0, FALSE, “false”, array(), etc) without getting PHP E_NOTICE messages (that I encourage you to show when developing): // Check that $var is set and is not empty:… Continue reading PHP: empty() is your friend
MySQL tip: Update a column with random values
I’m always impressed with what you can do with MySQL (my favorite RDBMS), not long ago I needed to add a column in a table and fill it with some random values. Instead of using a PHP (could be C, Java, perl…) script that goes row by row and calculates a random value, I thought… Continue reading MySQL tip: Update a column with random values
What is MVC?
The MVC design pattern separates business logic from user interface Model–View–Controller is a design pattern or a software engineering concept that separates the model, the view and the controller from each others, thus dividing the labour in your application in such a way that: The model is the brain, the knowledge, or simply data and… Continue reading What is MVC?
PHP code to remove breadcrumbs in a Drupal page
Sometimes you want to hide the breadcrumbs in a single page an keep it in the others, either using a module or inside a node. You can remove the breadcrumb from a Drupal page with this line of code: This is how I do it: drupal_set_breadcrumb(array());