Esteban Pastorino

Simple File Uploads with Backbone.js

September 27th, 2013

Backbone.js is great for doing single page apps or to tidy up some messy javascript code. But there are a few things that are a bit tricky to do, like uploading files. Sure, some browsers support uploading files via XHR, but some others don’t (I’m looking at you IE). There are a few workarounds for this situation. Here’s a quick explanation on how I achieved file uploads using Backbone.js in a recent project.

Rails Security Pitfalls

September 23rd, 2013

Another article for SitePoint. This one’s about some security issues and considerations on Rails. A few important things to have in mind. Go take a look!

Quick Ruby Tip: || vs or

September 12th, 2013

Quick heads up on operator precedence:

If you want to assign a value to a variable depending on a boolean, use || not or.

|| takes precendence over =. or does not.


a = false or true
puts a # => false
a = false || true
puts a # => true

Fixing a CPU-consuming logrotate

August 27th, 2013

Last week I noticed one CI server was taking a huge amount of time to finish a test suite. It was supposed to run a few minutes, but was taking hours instead. A few months before, when the server was just set up, it ran in a few minutes as expected. Here’s how it was diagnosed and fixed.