Menu

Articles

This is a collection of articles I wrote over the last couple of years. These days, I usually write about building and launching software products.

Script.aculo.us includes a nice effect called Effect.DropOut, which let’s the element fall in an “invisible trap” underneath. Surprisingly there isn’t an opposite effect. Calling Effect.DropOut with Effect.Transitions.reverse as transition, doesn’t work either. So what to do? Effect.Emerge to the rescue!

Effect.Emerge = function(element) {
  element = $(element);
  var oldStyle = {
    top: element
Read more

Andreas Wolff recently released RSpactor, a (up to now) command line tool similar to autotest. Nevertheless it differs from autotest in two points. First it’s focused on RSpec and secondly it’s using Mac OS’ FSEvents to monitor file changes. According to this it only runs on Mac OS. To get it running on Linux you’ll have to change RSpactor’s Listener class to use Linux’ equivalent to FSEvents called...

Read more

Typing SSH passwords again and again can be a real pain. For example: Lately I started to use Capistrano to deploy my rails applications. If I want to set up the maintenance-page on the server I’ll type cap deploy:web:disable which of course prompts me for the SSH password. Then I want to deploy my application with cap deploy and again will be prompted for the password. Finally I have to cap deploy:web:enable to remove the maintenance page which as mindful readers might have guessed already prompts for the password. This was just one reason for me to set up SSH authentication keys. At first I was a little worried that setting it up might be a bit complicated. Luckily I was disabused. If you want to switch to key based authentication too follow these simple steps.

Read more

By default it’s not possible to use a database-column called type for anything else than single table inheritance. To change this, simply use set_inheritance_column() and read_attribute():

class TypeTest < ActiveRecord::Base
  set_inheritance_column(:something_else)

  def type
    read_attribute(:type)
  end

  def type=(value)
    write_attribute(:type, value)
  end
end

Read more