Think In Geek

In geek we trust

Author Archive

Capybara, pop up windows and the new PayPal sandbox

This past weeks we have been doing a massive refactoring of our testing suite at work to set up a nice CI server setup, proper factories, etc. Our tool-belt so far is basically a well known list of Rails gems: Factory Girl for factories. RSpec as a testing framework (although we’ll switch back to Test::Unit […]

, , ,

Fast and easy way to block bots from your website using Apache

Some weeks ago the site I work on started having severe outages. It looked like the system was not able to fulfill the incoming requests fast enough, making the passenger queue to grow faster than new requests could be served. Looking at the rails logs it looked like some Chinese bot was crawling the entire site, […]


Node.js packages in Mountain Lion

tl;dr: make sure you add /usr/local/share/npm/bin to your PATH when installing node.js to be able to access the package binaries. Developing in Ruby on Rails on a Mountain Lion environment can be a pain. Although it’s a UNIX-like environment, most of the tools created for web development have been made with Linux in mind, and making […]

, ,

Mac OS X, iTerm and the meta key

If you use your Mac OS X as a development machine and are a regular user of the shell, chances are you are going to be using the movement commands a lot. Chances are, too, that you are using iTerm instead of the system provided Terminal app. Using the arrow keys is usually enough, but […]

, ,

Why I will never buy an Apple product again

Well, here it is. This is not a tech post. Not a programming post either. This is just a rant I really needed to put online for some people to know. Also, I know this will never appear on Hacker News but I always wanted to write one of those “why I <type here a […]

Sending emails using Google Mail with Ruby

It’s no secret that Google Mail has become, over the last years, the most widely used email server and client on the world. Not only it’s basically free, but with the use of Google Apps you can even use it on your own domains. Because so many people use it, even system administrators, it may […]

, , , ,

Ruby on Rails, Varnish and user dependent content

Ruby on Rails performance is a topic that has been widely discussed. Whichever the conclusion you want to make about all the resources out there, the chances you’ll be having to use a cache server in front of your application servers are pretty high. Varnish is a nice option when having to deal with this […]

, ,

A Ruby implementation of the FizzBuzz test using the Enumerator class

Some days ago I learnt about The FizzBuzz Test and did a simple implementation in Ruby. The FizzBuzz test is a simple algorithm that is supposed to do the following: For each number from 1 to 100: If the number is divisible by 3, print “Fizz” If the number is divisible by 5, print “Buzz” […]

, , ,

Push git tags to a remote repository

If you ever wondered how to push the tags you set locally to a remote repository in git, you can do it with the following simple command: git push –tagsgit push –tags


Give your Ruby console a dash of colour

When you’re developing an application in Rails (or Ruby), you spend lots of time in the IRB, the Interactive Ruby Shell. Usually just to test some Ruby code, start an application console or debug something going on inside the project. Yesterday, looking at a coworker screen, I saw he had his console with lots of […]

, , ,

Previous Posts Next posts