Tag Archives: Programming
Extracting Subject Alternative Name from Microsoft authentication client certificates
Among the client certificates present in an HSPD-12 smart card, you may find a Windows Smart Card Login certificate used for authentication, which has several particularities, one of them being storing the Subject Alternative Name (this is, the Windows logon and domain of the card’s owner) in an ASN1-encoded UTF8 string in a Microsoft extension (OID 1.3.6.1.4.1.311.20.2.3). What does this … more
Nuntium: exponential backoff and new xmpp library
This week we’ve updated nuntium to version 2.8, yay! Aside from some minor bug fixes, nuntium now implements an exponential backoff strategy when a message delivery fails. Previously, it worked like this: A message failed to be delivered. If the cause was the message itself (for example it contains invalid data), it was discarded. If … more
Introducing cukecooker: writing cucumber scenarios with aid
In our development team we want our testers to start writing cucumber features. I know, BDD, the features should be written before the code, but a tester could later add scenarios which we haven’t previously thought or regression features for bugs. For writing the scenarios she could learn the steps from other features or just … more
Rails Rumble is over: welcome GithubDamper!
This past weekend, together with Emmanuel Oga, we’ve been coding a Ruby on Rails application for this year’s Rails Rumble. The idea: in github you can watch some repositories, but later you can’t make a search over those watches. The only search github provides is one over all repositories. When your watches reaches a big … more
Even more powerful Goolge Visualizations for Ruby on Rails
Ok, now you can easily implement a Google Visualization API data source on rails. But… are you still using javascript to render them? Well, you don’t need to do that anymore. Now rgviz-rails supports a pretty simple and powerful way to do it. In your views templates you now have an rgviz function. You use … more
Powerful Google Visualizations for Ruby on Rails
So we have this project in Ruby on Rails where we keep track of several reports. Now we need to do some visualizations with all those reports. We analyzed several solutions. One was using Google Fusion Tables but we soon realized it was not an easy task: we need to keep our records synchronized with … more
Building an application to track expenses in one hour using GeoChat
Whenever one of our team member travels to another country we tell her to track expenses like food, transportation and accomodation so that later that money can be refunded. Each of us does it in a different way: we write it in a notes application in a cellphone, or in a text file in our … more
Quick way to test many values in ruby
Many times we end up having similar tests: same logic but different inputs and expected outputs. For example, suppose we need to test our brand new sqrt function: test “sqrt 1″ do assert_equals 1, sqrt(1) end test “sqrt 4″ do assert_equals 2, sqrt(4) end test “sqrt 9″ do assert_equals 3, sqrt(9) end Here we are … more
String concatenation in ruby
I just found out the difference between += and << when used for a string. irb(main):001:0> str = ‘chan’ => “chan” irb(main):002:0> str.object_id => 69952758899780 irb(main):003:0> str += ‘ged’ => “changed” irb(main):004:0> str.object_id => 69952758848800 irb(main):005:0> str << ‘, now not’ => “changed, now not” irb(main):006:0> str.object_id => 69952758848800 So I think that basically you … more
Ruby-Jump plugin for gedit
I searched the internet for a gedit plugin that would allow me to press a key and jump (navigate) to the file where a ruby class is defined. I couldn’t find one so I wrote one (I know about Geany but I couldn’t find that functionality there either). Usage If the file you are editing … more