Articles 43 to 63

Lamp

Configure VirtualBox Shared Folder as Apache Virtual Host

February 27, 2013

As mentioned in the previous article, I am using a virtual machine in order to test locally a small website built with nanoc containing a couple of dynamic PHP pages. We left out with a functional VM running a LAMP stack that was setup with a shared folder between the host and the guest containing the website to test.

In this article, we’ll configure Apache on the VM in order to use this shared folder as the source for a website that can be accessed directly from the host.

Read more...

Lamp

Minimal LAMP Stack for Website Development

February 17, 2013

Recently, I needed to have a LAMP (Linux, Apache, MySQL, PHP) environment in order to test out a few things for a website that was developed using nanoc but included a few dynamic PHP pages. While nanoc is mainly for static website, it is however flexible enough to include dynamic pages if one feels like it. The problem in this case relies in testing those dynamic components.

Even though I am using Linux on a daily basis, I didn’t deem appropriate to install a full LAMP stack just for the purpose of testing out a couple of pages. I therefore looked into some solutions providing a virtual LAMP stack that could then run inside a virtual machine - allowing me to do the development on the host system and test it on the guest one.

Read more...

Extract

Extract Email Addresses from a Mailbox Hosted on CPanel

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...

Eiffel Tower

8 "Welcome" Tours for Web Applications

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...

Super Size Me

Identify Largest Tables in MySQL Databases

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:

Read more...

GMVault

Install GMVault on a Synology NAS - Follow-up

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...

Git

Git Configuration Options

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...

Sublime Text

Configuration and Packages for Sublime Text 2

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...

Recursive windows

Recursively Search File and Delete Them

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.

Read more...

Bootstrap Documentation

Twitter Bootstrap Documentation

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

Email SMTP for Development / QA Environment

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...

Shredder

Shred Folder From Command Line

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:

Read more...

Process

Flowcharts and Mockup Applications

August 26, 2012

While writing a report recently, I needed to be able to illustrate some concepts in order to make them more understandable for the reader. In order to do that, I decided to look for a flowchart software that could help me achieve this. At the time of writing, the main functionalities that I was looking for were the availability to use network cliparts, the price (free was better in this case since it was for a punctual use) and finally the design of the application. The following review is just the tip of the iceberg of what is available out there. It is by no mean an exhaustive review and probably only focuses on what my needs were at the time of writing.

Read more...

SSH

4 Useful SSH Commands / Configuration Options

August 18, 2012

Since I have been using SSH extensively lately, I have discovered a few commands / options that have allowed me to be more efficient while using it. This is nothing really new for command lines gurus, but since I might eventually forget them, I write it down here so that I can get back to it later if needed.

Read more...

Tunnel

SSH Tunnel for Local Applications

August 9, 2012

Consider this simple scenario:

  • You have a computer / server / NAS / … at the office behind a firewall
  • The firewall is configured so that you are allowed to access the machine using SSH
  • The machine has services available on different other ports (but they are not accessible from the outside since only the SSH port is open)

Now, how can one access those different services that are accessible on ports blocked by the firewall?

A quite easy way (once you know the command), is to use SSH tunneling. To put it simply, it will allow to map the ports from the remote server that are not accessible to a local port of your computer.

Read more...

Calendar

Setup New ICS Calendar from WebDAV in Thunderbird

July 26, 2012

In order to have a work calendar that can be used in different devices (laptop, phone, …), I have set up an ICS calendar on a WebDAV host. This allows the calendar to be accessible from an online location (both readable and writable) and can therefore be used, in my case, both on my phone (Android) and on my laptop (Thunderbird).

The ICS calendar is hosted on a shared host (in this case Hostgator), and for the next step, I assume that your hosting is using CPanel.

Read more...

Skype

Skype Tips and Tricks

July 24, 2012

In the past two weeks, I have been sharing the same Skype tip a couple of time. I thought it might be interesting to have it in written somewhere so that maybe additional people get to learn it.

One of the great thing that Skype chat allows is editing messages that you have written. It is quite convenient when one makes an error while typing and wants to correct it. It can also be used to completely delete the message (if you wrote to the wrong person for instance).

Read more...

Backup

Backup a Website on Shared Hosting

July 14, 2012

Backup Strategy

And here we are: another article about backups. After some setup to back up gmail on a Synology drive, here is another article to continue on our backup strategy.

In this article, we will backup the files and database(s) on a web server that is on a shared hosting plan (in this specific case, hosted on Hostgator). There are usually two different possible approaches to backup files:

  1. Archive the file (zip, tar, gzip, …) and download the archive,
  2. Mirror the folder containing the files

Considering that there are some files I am not interesting in backing up on my webserver, I will go for the first solution so that I can white list what I am interested in and create an archive containing only the files that I want to back up. It should be possible to do that with the mirror strategy as well, but I didn’t have much time to investigate the matter.

Read more...

Cartridge

Add Printer in Ubuntu 12.04 with Gnome 3.4

July 13, 2012

Following an update of Ubuntu during which I simply formatted the system partition, I lost all the printers that were previously configured on my computer.

Based on what I read on different blog posts and forums, adding a printer from Unity is quite straightforward. Unfortunately for me, I am getting used to Gnome and have decided to have it as my main window manager and it seems that some of the tools working in Unity do not function properly under Gnome.

Read more...

SSH Agent

Load SSH Keys to Memory with SSH Agent

June 27, 2012

As I explained in my previous article, we have migrated our code base to Git. In the process of automating the deployment process on our production server, I wanted to use one of the latest feature of BitBucket: deployment keys.

Bitbucket has a very well documented process describing the overall procedure, but the whole step about starting the ssh-agent and loading keys is something that is a bit cumbersome to reproduce every time one logs in to the production server to pull an update.

To simplify this a little bit, I have automated some of the steps so that:

  1. The ssh-agent is started every time the user logs in through SSH
  2. a simple script responsible of loading the key(s) can be executed when one want to load them

Read more...