A place for opinions and notes of a valibuk.

Useful Vim Tips

Tagged with: — ondrej at 10:00 am on Friday, June 27, 2008

Vim is my favourite editor. I search for tips from time to time – and there are still nice surprises. After a few years of using it, it is high time to write down my own list of useful tips :)

(There is more where this came from … )

Rhotoalbum 0.6

Tagged with: — ondrej at 3:00 pm on Sunday, June 8, 2008

A new version of Rhotoalbum, a simple but powerful photo album generator written in Ruby, has been released.

The version 0.6 contains a lot of new features such as album statistics (number of photos, number of albums), EXIF support (exposure time, focal length, f-number and camera model), automatic album thumbnail creation from the first album photo, relative links and several bug fixes.

If you would like to know more, please, check the Rhotoalbum page.

require_gem ‘activerecord’

Tagged with: — ondrej at 1:05 am on Tuesday, March 11, 2008

A Ruby application that uses the ActiveRecord library (not a Ruby on Rails application) stopped working for me after an update of Ruby. The error message was:

  1. undefined method `require_gem’ for main:Object (NoMethodError)

The corresponding source code was:


(There is more where this came from … )

Updating from Categories to Tags in WordPress

Tagged with: — ondrej at 12:47 am on Wednesday, November 28, 2007

I updated my WordPress installation to the version 2.3.x and found a new feature: tags.
I converted all my categories to tags (except the Uncategorized category) and… what I saw a small disaster :) All categories disappeared (an expected result), but the categories list in my sidebar contained only one, not very useful, item Uncategorized. Additionally a blog entry contained only Filed under: Uncategorized, again, not very helpful.

And then I realised – I have my own theme… arrrrgh…. and there is no tags to categories converter ;>
Well, here are steps how to update your own theme to support basic tags features:
(There is more where this came from … )

Photos from China, Tibet, Nepal and India / Fotografie z Číny, Tibetu, Nepálu a Indie

Tagged with: — ondrej at 1:57 am on Tuesday, November 27, 2007

I selected the best photos from the last trip to China, Tibet, Nepal and India. There are really nice places to visit, esp. Tian’anmen Square in Beijing, Potala in Lhasa, Friendship Hwy from Tibet to Nepal, Kathmandu and last but not least the Taj Mahal in Agra.

Please, see my photoalbum, for the year 2007:
(There is more where this came from … )

Rhotoalbum 0.3 Released

Tagged with: — ondrej at 3:19 am on Wednesday, November 14, 2007

A new version of Rhotoalbum, a simple but powerful photo album generator written in Ruby, has been released. It is already its third release (0.3) and there are now really nice features as photo descriptions, more styles support with a style switcher or album options.

Thanks to Viktor Zigo (maybe you know his plug-in to Firefox XPather) for the most of the new features.

If you would like to know more, please, check the Rhotoalbum page. You are welcome to see our photo albums: Viktor’s or mine. Surprisingly, they are generated by Rhotoalbum ;)

Ruby on Rails, Capistrano, Mongrel and nginx on Gentoo

Tagged with: — ondrej at 1:25 am on Thursday, August 30, 2007

Ruby on Rails A few months ago I wrote quite popular :) manual how to install and use RoR, Capistrano and Mongrel with Apache on Gentoo. Things changed a little as the time goes and after some experiences with the nginx server on a Slicehost slice, I decided to write an updated manual and to use the nginx server instead of the Apache HTTP Server. Let’s start :)

A deployment process should be straightforward and automatic as much as possible. The main reason is that this process will be repeated many times and omitted or wrong steps usually cause hey-what-are-you-doing-the-site-does-not-work calls or e-mails from your customers. Fortunately, there is a nice tool for Ruby on Rails applications — Capistrano.

Larry the CowNow we know about a tool to automate the deployment of an application, but we need to deploy our application to a production environment — I decided for the combination of Mongrel and nginx.

…and everything runs on Gentoo :)

Here is my short howto:
(There is more where this came from … )

Focus On Form Element

Tagged with: — ondrej at 3:34 pm on Sunday, August 19, 2007

Ruby on Rails Ruby on Rails supports forms very comfortably: generating a form from a model, updating data of a model or validating input values. But I always missed one functionality: to set a focus on an element.

It is quite frustrating: a form shows in your browser, you start typing and you are overwriting the actual URL or you are typing to a quick find box. Well, it is my fault, because I did not check if the text cursor | is blinking in one of the form input boxes, so then I click to a wanted input box and, finally, I am typing to the right box :)

But there is a way how to save a movement with a mouse and one mouse click: to set the focus on one of the form elements. (Btw. you can also use the Tab key, but I need to press it 4-times to get to the first input box on a form in my Firefox. Surprisingly, I do not use this way so often. :)

(There is more where this came from … )


Tagged with: — ondrej at 5:02 pm on Saturday, July 14, 2007

A web photo album is already a common thing. The majority uses online web albums, where you can upload your photos, e.g. Flickr and Google’s Picasa. Also some social network portals are adding features to share photos between their users.

A much smaller group downloaded and installed a photo album application to their accounts on servers, e.g. Gallery and Coppermine. Usually they require to have a database and have a large possibilities to configure it, install plug-ins, manage photos, etc.

And then there is a special category — photo album generators. They are much simpler, usually do not use any database, but you have to regenerate your albums when you change your photos or you add a new photo.

(There is more where this came from … )

Ostrava On Rails – Talk / Prezentácia

Tagged with: — ondrej at 1:31 am on Saturday, June 23, 2007

Ruby on Rails I will give a talk about localisation (localization, l10n) and internationalisation (internationalization, i18n) in Ruby on Rails applications on the Ostrava on Rails conference on 23. June in Ostrava, Czech republic. I am looking forward to meet you there :)

Slides and examples will be available here after the conference, probably on Sunday.

Budem mať prednášku o lokalizácii (aby to pekne po našom :) a internacionalizácii (či podpore viacerých jazykov) v Ruby on Rails aplikáciách na konferencii Ostrava on Rails, ktorá sa koná 23. júna v Ostrave. Teším sa na stretnutie…

Prezentácia a príklady budú prístupné po konferencii, pravdepodobne v nedeľu.

O pár hodín vstávam aby som stihol byť v Ostrave ráno…

« Previous PageNext Page »