Lessons learned: Configuring #Ruby on #Rails (#RoR) app with #MongoId (#ODM) for accessing a #datastore in the #cloud

If for local stores you need just specify the databse name in the mongoid.yml default section, such as:

For the remote data store, it should be:

Or it can be specified by using the database full URI

Lessons learned: Ruby on Rails (#RoR)

Deploying to the Cloud with #MongoLab (ML) data store:

Do not use numbers only for database user’s password or #MOPED will through error converting FixNum to String.
Add appropriate handling of passwords.

Creating Barcodes for Brazilian Banking using Python and Reportlab

Decoding_Interleaved_2_of_5Some time ago I needed to add barcode generation for one of my client´s Web Service.
At the time , I implemented the payment slip layout using REPORTLAB python component which by the way is perfect for PDF generation and layouting.

Albeit that, for the barcode I used a separate image, that was generated by python code I wrote.
The algorithm I used had some flaws and the generated barcode image failed to match the number that originated it, when decoded by a barcode reader.

The Brazilian banking system is based on the “Interleaved 2 of 5″ (I2of5) barcode pattern.

Browsing the REPORTLAB documentation I found that this tool has primitives that generate the barcode using the I2of5 pattern so I decided to implement a sample before applying on the web app
.
The sample was sucessful so I am now using REPORTLAB for that purpose.

Here is the solution:

Getting your Google Plus and Hangout badges…

Google Talk was gone and with it my outdated badge in this blog.
This weekend I decided to finally fix this annoying issue and started to investigate how to get my google identity properly displayed in my blog.

As a side-effect I also wanted to allow visitors to be able to communicate (start a hangout with me and others ) eight while visiting my blog.

Google Developers API provides entry points that allow you to build such badges and to embed Hangout sessions within your own apps.

So, for embedding Hangout buttons anywhere, there is a detailed explanation here:
Google Developers – Starting Google+ Hangouts with the Hangout button.

There are different examples there.

Foe WordPress blogs there is a WP widget plugin that provides all Google+ kind of badges with fully configurable.
Developed by the guys at WP Italyplus

If you look on the sidebar right here, you will see my Google+ badge, Hangout button and Followers box, made with their plugin.