makandra dev
imagemagick.org

Paperclip uses the imagemagick resize options like 100x50> , 100x50<, 100x50# etc to resize images. See the link what options are...

makandra dev

There is no good equivalent for the Unix sudo command in Windows. Below are a few workarounds that are all...

makandra dev
wiki.debian.org

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...

makandra dev

Using OpenSSL it's very easy to seriously encrypt files. Use the script below. Input / Output are self explanatory. Put...

makandra dev

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...

makandra dev

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...

cyberciti.biz

To list the name and version of your Linux distribution, type the following: cat /etc/*-release

When you use the send_file method to send a local file to the browser, you can save resources on...

When you try to remove a non-existing index using remove_index, the migration will incorrectly pass without an error...

getfirebug.com

You know Firebug as a Firefox extension but there is also a "Lite" version which runs purely off JavaScript.

babushka.me

The idea is this: you take a job that you'd rather not do manually, and describe it to babushka...

A check if two date or time ranges A and B overlap needs to cover a lot of cases:

Note: Consider not doing this. Use form models or vanilla methods instead. The :conditions option for Rails associations cannot take...

alfajango.com

The difference between .bind(), .live(), and .delegate() is not always apparent. Having a clear understanding of all the differences, though...

Sometimes it is useful to define a named scope by implementing a static method with the scope's name on...