OS X: Enable write support for NTFS partitions

Write files on NTFS partitions instead of just reading them.

Ruby: Nil or empty

Are you frustrated when checking for an empty value in Ruby, and always end up having to check for nil too? Have you gladly moved from PHP to Ruby but long for some flexibility in variable typing? Here's a simple method to check for both on almost any variable.

CSS: Responsive iframe with aspect ratio preserved

With this CSS, you can insert an iframe and make it scalable, keeping its aspect ratio.

Drupal: Use PHP's built-in Web server for development

Use PHP's built-in Web server to run Drupal in development, to help avoid you the headache of setting up a system-wide Web server like Apache or nginx.

PostgreSQL on OS X with Homebrew: Upgrade database from 9.2 to 9.3.1

I installed PostgreSQL on OS X using Homebrew a while ago. After running brew update, I didn’t realise PostgreSQL was updated from 9.2 to 9.3.1. What I also didn’t know was the new database format of the new version was incompatible with the older...

OS X: Add a loopback alias

To add then delete a loopback IP addresse (like on OS X: sudo ifconfig lo0 alias sudo ifconfig lo0 -alias Useful when you wish to map multiple local domain names in /etc/hosts to various virtual local hosts. The chan...

Development Gems for Ruby on Rails

They add no functionality to the app itself, but they’re great for development: group :development do gem 'annotate' gem 'better_errors' gem 'binding_of_caller' gem 'bullet' gem 'debugger' gem 'flay' gem 'hirb' gem 'localtunnel' gem 'lol_dba' gem ...

Digest Authentication in Ruby on Rails

Use authenticate_or_request_with_http_digest: class ApplicationController < ActionController::Base # ... before_filter :authenticate_user REALM = Rails.application.class.parent_name private def authenticate_user user = authenticate_or_request_w...

Ruby on Rails 3 with Salesforce: Conclusion

Don’t do it. If you even think about doing it, you’re nuts. This summarises the conclusion of an article I wrote half a year ago about my attempt to use Salesforce as the primary database for Ruby on Rails. In details, just before I wrote the prev...

Ruby on Rails 3 with Salesforce's Database.com

This article is the first part of two: read the conclusion. During my many years as a Web developer, I’ve worked with a variety of different technologies, languages, applications, and backends, all stacked in many different ways. There are stacks ...