Articles 31 to 40

Extract Email Addresses from a Mailbox Hosted on CPanel

By Jimmy Bonney | December 28, 2012

If you are using CPanel default mailboxes, you may have noticed that the contacts from whom you receive emails are not added automatically in your address book on CPanel. This is not a big problem but if you are using a mail application such as Outlook / Thunderbird / Mail / … and collect multiple email addresses in this application, then there is no easy way to extract the contacts that belong to only one of your email addresses.

To better illustrate the situation, let’s assume that you are using a mail application on your computer / tablet that collects your professional (@your-domain.com) and your personal email addresses (for instance @gmail.com or @hotmail.com). Usually such applications will create and maintain an address book for you but unfortunately, most of the time this is a common one that will therefore contain both your professional and personal contacts in one place. If you haven’t edited and sorted your contacts on a regular basis, then you most probably won’t be able to differentiate the professional from the personal contacts. In case you wish to send out some information to your professional network only, this might end up being a tedious work.

Everything is however not completely lost if your professional emails are hosted on a server using CPanel. Provided that all your emails are still on the server, it is possible to extract the email addresses of the different people that you have been in contact with. The following paragraphs will illustrate how to do that.

Read more...


8 "Welcome" Tours for Web Applications

By Jimmy Bonney | December 1, 2012

D-Sight Web is evolving quite fast lately and as we are putting new functionalities in place, we estimated that it was time as well to bring some guidance for the users. As a first step, when new users sign up, we redirect them to a brand new home page listing the different projects that they can work on.

While this view is leaner than what we used to offer, we decided to create as well a Welcome Tour in order to introduce users to this new interface. We will re-use this component throughout the application in the future in order to bring some additional help to the different steps of the decision-making process.

In the following sections of this article, we will cover a few jQuery plugins or pure JavaScript implementation allowing to deploy tours to web application in a quick and easy way.

Read more...


Identify Largest Tables in MySQL Databases

By Jimmy Bonney | November 25, 2012

Last week, as we were migrating to production the new version of our corporate web site, we came to realize that the database used on our dev / QA site had grown more than 20 times the size of the production DB.

Identifying the culprit table was however not that complicated. A simple SQL command allows to get the size of all tables in the DB:

SELECT s.schema_name,t.table_name, CONCAT(IFNULL(ROUND(SUM(t.data_length)/1024/1024,2),0.00),"Mb") data_size,CONCAT(IFNULL(ROUND(SUM(t.index_length)/1024/1024,2),0.00),"Mb") index_size, t.ENGINE ENGINE, t.table_rows TABLE_ROWS,t.row_format TABLE_ROW_FORMAT,date(t.update_time) FROM INFORMATION_SCHEMA.SCHEMATA s LEFT JOIN INFORMATION_SCHEMA.TABLES t ON s.schema_name = t.table_schema WHERE s.schema_name not in ("mysql","information_schema") GROUP BY s.schema_name,t.table_name,TABLE_ROW_FORMAT,ENGINE ORDER BY TABLE_ROWS DESC,data_size DESC,index_size DESC;

Read more...


Git Configuration Options

By Jimmy Bonney | November 17, 2012

For the same reason that pushed me to publish my configuration of Sublime Text 2, I will introduce my git configuration file in this article. This will allow me to import it more easily on other systems when I need it (and it might inspire someone else to use (some part of) it as well).

The current configuration (it lies in the ~/.gitconfig file in a Linux environment) can be found below and an up-to-date configuration file is available on this gist:

Read more...


Install GMVault on a Synology NAS - Follow-up

By Jimmy Bonney | November 17, 2012

Following the installation of a new version of the firmware on the Synology, I had to re-configure the gmail backup that I previously discussed in this article.

I took this opportunity to do two things:

  1. try out the alternative method that I suggest in order to install python easy_install tool
  2. install GMVault through the Python Package Index method

This article will be less verbose than the previous one and will mainly focus on the commands that are necessary during the installation.

Read more...


Configuration and Packages for Sublime Text 2

By Jimmy Bonney | November 10, 2012

It seems that within a year, Sublime Text has become one of the most loved text / code editor around here. I cannot count the number of articles that have been written about it, and it’s probably a good thing: it means that people like it… a lot.

I have been using it for some time now and I completely understand why people are so optimistic about it. Among others strong points, we can simply cite:

  • Cross platform (Windows, OSX, Linux) software
  • Configuration options for pretty much everything
  • Many, many packages to add even more functionalities

Read more...


Recursively Search File and Delete Them

By Jimmy Bonney | October 15, 2012

When conflicts occur when merging files with GIT, some temporary files with the .orig extension are created.

One can easily add the *.orig extension to the .gitignore file so that these files are not commited to the remote repository. However, once the conflicts are solved, the files remain in the project directory. This is obviously not a big deal but it might result in unwanted matches when doing a global search on the project for instance.

In order to delete those unwanted files, one can simply run the following command from the project root folder:

find . -name '*.orig' | xargs rm

Read more...


Twitter Bootstrap Documentation

By Jimmy Bonney | October 14, 2012

Twitter Bootstrap is a great front-end framework. It makes it not only easy but also rather fast to deploy a new website / web application with a consistent and well-tested style.

Even though the creators of the framework have left Twitter recently, one thing is for sure: the framework will continue to live on. With new releases going live on a regular basis, it might sometimes be confusing to find the appropriate documentation.

One could obviously update his / her website / application as soon as a new release shows up, but unfortunately, some changes might need some refactoring and therefore be time consuming. It is therefore important to be able to access documentation from previous version of the framework.

Well, that’s where BootstrapDocs comes in. All documentation from past versions of Twitter Bootstrap are accessible from there, in one place.

Read more...


Email SMTP for Development / QA Environment

By Jimmy Bonney | September 4, 2012

Developing web applications often requires emails to be sent out, whether it is during the registration process, for newsletters or for some events notifications.

When the application is live, there are plenty of options to send the email:

  • simple sendmail application
  • connection to a SMTP server
  • connection to a SMTP application (web application allowing to track emails that have been sent)

However, when one uses any of this option in a development environment, the inbox might become quickly spammed with test emails. Even worse if using a QA environment that has production data, there is a risk that some emails are actually sent to the original user by mistake. Not the best move towards your customers…

Read more...


Shred Folder From Command Line

By Jimmy Bonney | August 28, 2012

Before getting rid of a server, I needed a quick and efficient way to wipe some of the data that we had on the disk. Fortunately, this functionality is built in into Linux1 so a quick search on Google provides the necessary command:

shred -v -n 1 -z -u /path/to/your/file

It is possible to increase the number of passes (i.e. the number of time data is written over your original data) simply by specifying it after the -n options.

Read more...