When your site is mapped into the URL-space of another server using mod_proxy, ProxyPass and ProxyPassReverse, all requests...

In order to redirect all requests from redirecting-host.com to desired-host.com while keeping path and query params unchanged, change your Apache...

You configured authentication in your Apache configuration that requires username and password but you want a single IP address, host...

When you need to see the content of a page (i.e. not all the HTML but the relevant text body...

When you eagerly load an association list using the .include option, and at the same time have a .where on...

apidock.com

To temporarily change the current working directory in Ruby, call Dir.chdir with a block. The previous working directory will be...

This card explains how to install RubyMine for the first time. If you want to upgrade an existing RubyMine installation...

web.archive.org

This step tests whether a given select option comes preselected in the HTML. There is another step to test that...

This collection of Sass mixins enables cross-browser styling (including IE with CSS3PIE) with less lines of code.

For clarity and traceability, your commit messages should include the ID and title of the Pivotal Tracker story you're...

makandra dev

The following initializer provides an :alias => "my_route_name" option to restful routes in your route.rb. This simply makes the...

git diff commit_hash -- path/to/file Provide any commit hashes or branch names like "master" for commit_hash.

This note describes how to setup a box running Ubuntu to share its Internet connection with another PC.

This returns the name (including path) of your current layout: response.layout => "layouts/admin" # inside views that are using the 'admin' layout...

When using form_for you can give the form's target URL either as a string or an array:

github.com

The ancestry gem allows you to easily use tree structures in your Rails application. There is one somewhat unobvious pitfall...

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

Even when you're using bundler, it might be significant in which order your gems are listed in your Gemfile...

timetobleed.com

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

A good tool to generate strong passwords and secrets is "apg". You can get it with sudo apt-get install...

If you need to call a state_machine event and do not want to re-define resource_controller's create...

Both these approaches will keep your GET parameters -- and will only work for GET requests. Capybara: When /^I reload the...

In /etc/crontab In /etc/cron.d/* In /etc/cron.hourly/* In /etc/cron.daily/* In /etc/cron.weekly/* In /etc/cron.monthly/* In the personal crontab of any user. This...

You can use record.send(:update_without_callbacks) or record.send(:create_without_callbacks) This can be used as a...