Update Node.js using the terminal

These are just the steps to update Node.js by using your terminal: sudo npm cache clean -f sudo npm install -g n The n package represents a Node helper, and running this command upgrades node to the latest stable version. sudo n stable Just to confirm we can check our version: node -v // Output…

Could not open input file: composer.phar error in Symfony 2. SOLVED.

This is a common issue that is related to bad installation of our favorite PHP package manager: Composer. Let’s fix it: Open your terminal and run following comand in order to get the latest version of Composer: curl -sS https://getcomposer.org/installer | php I recommend you to move the composer.phar file to a global “bin” directory,…

Solving Drupal error: PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

The problem After downloading a Drupal project I am working on, and importing its database I got this kind of message related with a PDO Exception: Additional uncaught exception thrown while handling exception. PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT s.lid, t.translation, s.version FROM {locales_source} s LEFT JOIN {locales_target} t ON s.lid = t.lid…

How to get metadata of images in Mac OSX

Today, one of our clients was having an issue with images on iOS devices, so, the first thing they asked us, was about if the images were in the right format, for answering that, we had to obtain the metadata of every single image and see if the extension matched with the real information. So,…