Inspecting a MySQL database’s storage engine
Ever wonder what engine your MySQL database tables are stored in? Each table has its own engine setting, it’s not global per database. Use this query to find out what engine each of your tables is using:
SELECT table_name,engine FROM information_schema.tables;
And if you want to, for example, update the users table to use the InnoDB engine, use something like this:
ALTER TABLE users ENGINE=innodb;
Condition Building made easy
Just used this technique to build a page which can handle one or more optional conditions. This is definitely the best way I’ve seen to build a set of complex conditions into a single query.
What If A Key/Value Store Mated With A Relational Database System?
“I find the best way to describe Mongo is the best features of key/values stores, document databases and RDBMS in one.”
Sounds very compelling, but still in its early stages as far as Rails support goes.
Tips & Tricks for IRB
Most of these I was familiar with except for utility_belt, which is awesome because it lets you edit IRB code using your favourite text editor like TextMate! Just type “mate”, put in all your code in the new window, close when done, and IRB will give you the result. Just one of many tricks in utility_belt’s bag.
What you don't know about regular expressions in ruby
Using ^ and $ to signify the start and end of an expression can result in expected behaviour, and even presents a security risk.