Hehe ;)
Removing constraints in migration
With a migration you can create a table or insert data to a table, also there is a possibility to modify existing tables; from renaming tables to changing the type of a column. And what about constraint such as default value or not null?
Yeah, you can change them too, but I was only successful with adding them — removing them was not possible with standard Rails methods.
(There is more where this came from … )
Observing more fields with AJAX helper and Unicode
In my post about using the observe_field helper for observing more fields I used the escape method (on the client side).
I have found out the code does not work correctly with Unicode characters :(
(There is more where this came from … )
Switching Network Configurations
I use my notebook mainly on two places: work and home. Each of this places has different network configurations — at work I have a fixed IP, at home I have a DHCP server.
Actually there is a very nice application for changing network configurations (or, if you like, profiles) — QuickSwitch (emerge quickswitch).
(There is more where this came from … )
Clicking Sound of Hard Drive on Dell Notebook
Arrrrgh… It was like a torture! The harddrive in an only-few-days-old notebook (Dell Latitude D820) was producing an annoying clicking sound.
Click… 10 seconds…. CLICK…. 9 seconds…. CLICK
(There is more where this came from … )
Gentoo on Dell Latitude D820
Hurrah :) This week week I got a new notebook. Yeah, it took one month (meanwhile I was reading the Programming Ruby book, so it was quite short month; it is a nice book, I can only recommend it ;).
But back to the notebook. I installed Gentoo on it and I wrote a short howto.
Copy With Exclude
The cp command does not provide any exclude functionality. There is a nice way how to achieve it:
-
(cd "./${SRCIN_DIR}" && tar cpf - –exclude=.svn . ) | (cd "./${DEST_DIR}" && tar xpf - )
Various Number of Conditions
Filtering is basically about writing conditions. In most cases the number of conditions is fixed, e.g. an internal filter in an application. Then it is quite easy to prepare a value for the conditions parameter.
But what to do if a number of conditions may vary? It is not a good idea to pass an empty value, because an empty value is still a valid value. We have to somehow implicitly say that a condition with an empty value should not be taken into a filtering process at all.
(There is more where this came from … )
Flash Without Font on (K)Ubuntu?
Did you install Flash plug-in into Firefox on Ubuntu or Kubuntu? Do you see any text in Flash applications such as Google Analytics graphs? No?
Try this :)
sudo apt-get install gsfonts-x11
