If you want to see how long your database queries actually take, you need to disable MySQL's query cache...

timetobleed.com

This post will describe how I stumbled upon a code path in the Linux kernel which allows external programs to...

You need to install the following packages before you can build the Paperclip gem: sudo apt-get install imagemagick librmagick...

makandra dev

If a SSH shell dies (from timeout for example), you cannot kill it with the usual CTRL-C or CTRL...

These steps are now part of Spreewald. This note describes a Cucumber step that lets you write this:

makandra dev

Note that you should disable the Java plug-in in your browsers after installation. Ubuntu >= 12.04 Java 11

To only run a single describe/context block in a long spec, you can say spec spec/models/note_spec.rb:545 ... where the describe...

When Paperclip attachments should only be downloadable for selected users, there are three ways to go. The same applies to...

If you need to find all files inside a directory that were modified in the last 24 hours you can...

Be careful! The following solution will delete files on a volume. If you don't know exactly what you're...

wmd-editor.com

WMD is a simple, lightweight HTML editor for blog comments, forum posts, and basic content management. You can add WMD...

When submitting textareas, browsers sometimes include carriage returns (\r) instead of just line feeds (\n) at the end of each...

github.com

By default, Cucumber uses mocha. This note shows to use RSpec stubs and mocks instead. Rspec 1 / Rails 2

Call with the server's hostname (and user if you have no SSH agent), e.g. install-gems-remotely my.server.com

gem-session.com

If you want to exclude your staging site from Google using robots.txt without running the risk to forget deleting the...

makandra dev

There are two distinct ways of commenting Haml markup: HTML and Ruby. HTML comments This will create an HTML comment...

makandra dev

This is an awesome gadget in your toolbox, even if your test coverage is great. gem install ruby-debug (Ruby...

There will probably be better solutions as we become more experienced with using Bundler, and more command line tools become...

makandra dev

Update RubyGems and Passenger Bundler requires Rubygems >= 1.3.6. Run gem update --system if you have an older version.

Sometimes files attain executable-flags that they do not need, e.g. when your Windows VM copies them over a Samba...

makandra dev

You may omit the /path/to/link_name to have a link with the same filename appear in the current directory

When working with times and dates in Rails applications, you need to deal with the following problem: In Rails, Time...

regular-expressions.info

You can write regular expressions some different ways, e.g. /regex/ and %r{regex}. For examples, look here. Remember that it...