We upgraded a Rails 2 application to Rails 3.2 and Ruby 2.1, changed the mysql adapter from mysql to mysql2...

dev.mysql.com

Directly from the MySql docs: There are three likely causes for this error message. Usually it indicates network connectivity trouble...

Open a MySQL root shell and use this command: PURGE BINARY LOGS BEFORE DATE(NOW() - INTERVAL 3 DAY) + INTERVAL 0...

sysadmincasts.com

Like Railscasts or Ruby Tapas, but for Linux.

By default, Rails' validates_uniqueness_of does not consider "username" and "USERNAME" to be a collision. If you use MySQL...

You might have a table without a primary key set in MySQL. You can fix this by adding a primary...

codeka.com.au

For reasons that completely escape me, MySQL 5.x limits UTF-8 strings to U+FFFF and smaller.

Like in any language, a FLOAT will eventually corrupt data due to rounding errors. Please use DECIMAL, which has well...

css-tricks.com

Crazy hack. Might be useful one day. The code required has since been extracted into a library.

I had a huge MySQL dump that took forever (as in: days) to import, while I actually just wanted to...

dev.mysql.com

A MySQL DECIMAL column is used when it is important to preserve exact precision. It takes two parameters, where...

TLDR: This card explains which threads and processes interact with each other when you run a Selenium test with Capybara...

If you want to sort a Ruby array with a primary, secondary, etc. criterium, use a sort_by that contains...

dev.mysql.com

Usually our mysql queries are not case sensitive. In order to query case sensitive, you can use the mysql COLLATE...

Ubuntu has a package mysql-sandbox that lets you install multiple MySQL versions into your user home: Install mysql-sandbox...

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