railsmonk RSS

Hey, I'm Dima Sabanin and I love programming and I've been doing this since I was 10 years old. For the last 3 years I work with Rails.

I study Zen, I have a family with a small kid. This is my brain dump.

Email: sdmitry@gmail.com




Recommend Me

Archive

Oct
23rd
Thu
permalink

Why Phusion Passenger better than Mongrel for development?

It starts new processors for new requests automatically, and kills them after they are not needed. So if you have a big site running locally, and you don’t want to setup mongrel cluster and load balancer, my advice is to go with Passenger. It’s really a piece of cake to setup if you have apache installed (and you do, if you’re on Mac or Linux).
Oct
22nd
Wed
permalink
Oct
21st
Tue
permalink
Sep
27th
Sat
permalink

My StringTidy plugin

This is really tiny one.

About

Wraps Tidy gem into String for easier usage. Allows you to clean up portions of HTML code in strings, without any effort.

Requires Tidy gem and Tidy C lib (which is installed on Mac and most Unixes by default).

Defines String#tidy(options={})

Usage examples

Installation

  1. gem install tidy
  2. ./script/plugin install \ git://github.com/railsmonk/string_tidy.git

Sources

http://github.com/railsmonk/string_tidy/tree/master

There’s also some other stuff on my github page, check it out.

Sep
8th
Mon
permalink

No broken tests in git repos

Following code forbids commit to repository if tests don’t pass. Script for rspec, but should probably work with anything else - just replace rake spec with rake test.

Sep
6th
Sat
permalink
We live in illusion and the appearance of things. There is a reality. We are that reality.
When you understand this, you see that you are nothing,
and being nothing, you are everything.
That is all.
— Kalu Rinpoche
Aug
8th
Fri
permalink

ConfigurationFile plugin for Rails

My plugin to handle YAML configuration files in Rails apps.

For most cases just YAML::load will work, but in my case I needed string interpolation, so I decided to make a little plugin out of that.

Here’s simple usage pattern:

Feel free to fork and do whatever you want with this.

Update:
Forgot the link to plugin itself: http://github.com/railsmonk/configuration-file-plugin

Aug
4th
Mon
permalink
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
— Quote of the Day
Jun
19th
Thu
permalink
life freezes without github
Jun
18th
Wed
permalink