Sometimes you might want to know if an attribute is an associated object or a simple string, integer etc. You...
If you want to get a deep understanding of how closures, blocks, procs & lambdas in Ruby work, check out the...
MySQL's MIN and MAX functions are for aggregations only. This will not work and produce an error:
My T410 has a NVIDIA graphics card (NVS 3100M). My BIOS configuration looks like this: NVIDIA Optimus is disabled in...
If you use a form (or form fields) multiple times inside one view, Rails will generate the same id attributes...
Flash movies (.swf files) can talk with Javascript code embedded in the same HTML page. There are two ways to...
Although you can access many symbols using the AltGr key you may be missing some, like the en-dash (–) or...
A while ago we were working on an application that had an entire version specially created for mobiles, such as...
Note: For PostgreSQL you should use advisory locks. For MySQL we still recommend the solution in this card.
Paperclip uses the imagemagick resize options like 100x50> , 100x50<, 100x50# etc to resize images. See the link what options are...
There is no good equivalent for the Unix sudo command in Windows. Below are a few workarounds that are all...
This note is a reminder that there is something called AppArmor that could cause weird errors ("File not found", "Can...
To open a terminal quickly navigate to System → Preferences → Keyboard Shortcuts. There, click the "Run a terminal" row (It should...
On 32bit systems, the maximum representable Time is 2038-01-19 03:14:07 in UTC or 2038-01-19...
Have a backup. Stop MySQL: sudo service mysql stop Move (or copy) your mysql directory. If you want /mnt/mysql to...
Using OpenSSL it's very easy to seriously encrypt files. Use the script below. Input / Output are self explanatory. Put...
When you delete a file with rm it's still possible to recover the file or parts of it. Use...
To test whether two arrays have the same elements regardless of order, you can use the =~ matcher in RSpec < 2.11...
The code below shows a method #validate which uses Nokogiri to validate an XML document against an XSD schema. It...
Sometimes you want to run a command forever, e.g. to compile a haml to html file on the console. Use...
When you need to bulk rename files you can not call "mv *.foo *.bar" to change the extension of all...
Note that this sounds good but is not good at all when hooking tasks on cap deploy (see this article...
In order to bring up a textual description of a Capistrano task you can say cap -e taskname ... where taskname...
This note describes a Cucumber step definition that lets you say: Then "Mow lawn" should be an option for "Activity...