I recently experienced the error ActiveRecord::StatementInvalid: Mysql2::Error: closed MySQL connection. Apparently this happens when there is a timeout...

So you're switching to PostgreSQL from MySQL? Here is some help... General hints on PostgreSQL \? opens the command overview...

We tend to use database transactions as a magic bullet to get rid of all our concurrency problems. When things...

Active Record's select method allows you to make use of the power of MySQL select statements. On the one...

This trick might be useful to implement more complicated directives in AngularJS. I needed it to do drag'n'drop...

highscalability.com

Awesome battle report from Pinterest trying to scale their setup using different approaches. When you push something to the limit...

Rails gives you migrations to change your database schema with simple commands like add_column or update. Unfortunately these commands...

Caution when using .where to exclude records from a scope like this: # Fragile - avoid User.where("id NOT IN (?)", excluded_ids...

coding.smashingmagazine.com

Smashing Magazine lists some handy tricks for print style sheets, all with CSS: Expand External Links For Print

Do not pass times to date attributes. Always convert times to dates when your application uses time zones. Background

ariejan.net

Rails understands a :limit options when you create columns in a migration. Its meaning depends on the column type, and...

Here is a hacky way to load dumps directly from the source server, without fully copying them over and extracting...

mysqlperformanceblog.com

When MySQL refuses to use your index, there's a number of things that you may be doing wrong. One...

Do not investigate in the 2342 tools that exist for migrating IMAP accounts from one server to another. They all...

validates_uniqueness_of is not sufficient to ensure the uniqueness of a value. The reason for this is that in...

The way MySQL's FULLTEXT tokenizer splits text into word tokens might not always be what you need. E.g. it...

blog.teamtreehouse.com

If you wear a lot of hats in a small team, or if you feel like your projects could be...

TLDR: In tests you need to clean out the database before each example. Use :transaction where possible. Use :deletion for...

durdn.com

This article contains: Making ‘git diff’ wrap long lines Set a global proxy Clone only a specific branch

When searching for text in a MySQL table, you have two choices: The LIKE operator FULLTEXT indexes (which currently only...

If you get a stacktrace complaining about uninitialized constant MysqlCompat::MysqlRes a system library update might broke your gem.

In theory you can take any scope and extend it with additional joins or conditions. We call this chaining scopes...

If your application has forms to edit string fields, you probably want to strip the entered values (remove whitespace from...

makandra dev
speakerdeck.com

The linked slidedeck holds many tips, of which I list the most interesting to me below DATA and END