Think In Geek

In geek we trust

Uncategorized

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 […]

Common linking issues in C++

Introduction C++ is a language derived from C, so in essence all problems at link time boil down at declaring stuff but not defining it. Declaring something in C++ means bringing the entity into existence in the program, so it can be used after the declaration point. Defining something means giving a complete description of […]

Crazy stuff in C++ (1)

Introduction C++ is a controversial language: you love it or you hate it. As always, knowing better about something allows one to make better arguments for or against that thing. This is what this series is about. Here I’ll explain some of the less known (except for C++ expert programmers, of course) features of C++. […]

, , , ,

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” […]

, , ,

Previous Posts Next posts