Articles 51 to 60

Install GMVault on a Synology NAS

By Jimmy Bonney | June 17, 2012

Everybody is aware of how important it is to perform backup. This is especially true when you do not own the architecture on which your files are hosted.

Many of you probably remember the outage that GMail faced a bit more than a year ago when accounts have been accidentally deleted. Most of them (all?) have eventually been restored but this incident was probably a wake-up call for many. Once again, unless you have a local backup of your data, you are actually not owning anything when working with cloud services.

Quite a few websites have been spreading the word about GMVault lately. This is a great initiative that allows to easily backup data from your GMail account and easily restore them in case you need to. In order to automate the process, and ensure that backups are taken on a regular basis, I have configured a NAS (Synology DS111) to perform this operation.

Read more...


Reintegrate Branch to Trunk with Subversion

By Jimmy Bonney | June 16, 2012

There are quite a few SVN commands that I do not use so often but that I need every once in a while. One of them is related to reintegrating a branch into the trunk.

Assuming that one is working with the trunk as a working copy and want to reintegrate the branch called feature, the reintegrate command is simply:

svn merge --reintegrate url://path/to/branches/feature .

Read more...


Commit Comments and Changed Files in Subversion

By Jimmy Bonney | June 16, 2012

There are quite a few SVN commands that I do not use so often but that I need every once in a while. One of them is related to getting log information from previous commits.

While it might be trivial to get those data from a SVN GUI client, getting the list of commited files and comments from previous version from the command line can be tricky.

Without further due, here is the command to run to get the list of files that have change in a specific revision as well as the comment that goes with it:

svn log -v -r N [https://yoursvnurl.com|.]

Read more...


Pattern Backgrounds

By Jimmy Bonney | June 16, 2012

Since the background of this website was a bit simplistic (not to say particularly dull), I have been looking for something to replace it. And well, if you are reading this from the website itself and not the RSS feed, you migh have notice the new pattern in the background.

I ended up using some pattern from the Subtle Patterns website and while I am not a designer, I think it looks much better now.


Revert a Single Commit in Subversion

By Jimmy Bonney | June 10, 2012

There are quite a few SVN commands that I do not use so often but that I need every once in a while. One of them is related to reverting a single commit.

If some code has been committed to the repository but you then realize later that those changes should not have been commited for some reason (code breaks some functionalities, tests not running, …), it is possible to execute a reverse merge.

In order to revert a single commit in the working copy, one can simply use the following syntax:

svn merge -c -N .

where N is the revision number that needs to be reverted.

Read more...


Connect to Zoho CRM with Ruby

By Jimmy Bonney | June 3, 2012

At D-Sight, we use Zoho CRM to follow-up on our leads (people who try out D-Sight or D-Sight Web). Being able to integrate Zoho solutions with our products makes it easier for us to focus on important activities, rather than spending time importing contacts manually from our applications.

The problem is that Zoho documentation is rather sparse on technical details about Ruby integration. Quite a lot of things are available for PHP and Java users but for the moment it seems that Ruby is not a top priority. However, Zoho offers a great API and therefore integration with Ruby is not that complicated.

We have therefore created a script that reads in a MySQL database, extracts the latest entries and sends them to Zoho. In case any error occur while sending the data to Zoho, an email containing the entries that could not be added is sent out to the administrator.

Read more...


PHPList Export Unconfirmed Users and Blacklist them

By Jimmy Bonney | November 27, 2011

Before making a new bulk import in PHPList it is important to ensure that the imported users will not override the “unconfirmed” status of existing users. Since PHPList does not offer options to blacklist existing unconfirmed users we will proceed in two steps:

  1. Export unconfirmed users
  2. Blaklist unconfirmed users

Read more...


SVN Commit Working Copy to New Branch

By Jimmy Bonney | October 10, 2011

If you have ever been working on code to realize that you cannot commit the changes that you have made to the original branch you were working in, it might get a bit annoying. Fortunaltely, there is an easy way to commit your code in a new branch (without you losing any data).

In order to do that, you only need to follow three steps:

  1. Create a new branch in which you will commit your changes
  2. Switch your current working copy to this new branch
  3. Commit your changes to the new branch

Read more...


Javascript Autofocus in Form

By Jimmy Bonney | October 3, 2011

When using javascript in Rails in order to fill in forms and remain on the same page, it is nice if after submitting and resetting the form, the focus is set back on the first element of the form. In order to do this, you can simply use the following piece of JS in your file.js.erb:

$("input:text:visible:first").focus();

Embed view in Ubercart catalog

By Jimmy Bonney | August 22, 2011

Ubercart comes with a catalog that allows to display the different products in categories. This is a pretty nice and convenient way to browse through the different product families but for the product browsing itself, a list is much more easy to go through. The problem with the catalog list / table default display, is that it doesn’t use Views but rather a default call to the ubercart table display.

Fortunately, Ubercart makes it easy to override this default call. For this, one just needs to define a themable function (theme_uc_catalog_products($products)) in template.php in order to make a call to a predefined view with the function views_embed_view.

Read more...