Do not pass times to date attributes. Always convert times to dates when your application uses time zones. Background
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...
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...
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...
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...
The linked slidedeck holds many tips, of which I list the most interesting to me below DATA and END
Example task: Multiply the table holidays between several stages. Open two terminals: shell-for stage_1 shell-for stage_2...
Trick: Do not use convert but mogrify: mogrify -resize 50% * This overwrites the original image file. In contrast, convert writes...
When you work in the MySQL console and you want to see which database is used, type: SELECT database();
Interesting interview with DHH, where he talks about how they made the new Basecamp feel very fast without using a...
This article describes how to reset MySQL's or MariaDB's root password on your workstation. It's meant for...
Nice list of icon sets that come in the form of fonts. I recommend Font Awesome.
For string columns, MySQL indexes the left side of a string. That means an index can speed a like query...
So you got this error, even though your Gemfile bundles mysql2: !!! Missing the mysql2 gem. Add it to your Gemfile...
The next version of MySQL will include a built-in memcached daemon. This daemon can quickly get and set key/value...