Note: For PostgreSQL you should use advisory locks. For MySQL we still recommend the solution in this card.
Have a backup. Stop MySQL: sudo service mysql stop Move (or copy) your mysql directory. If you want /mnt/mysql to...
What are Google’s plans for turning WebM into a genuinely open standard, one that is based on consensus like...
The code below shows a method #validate which uses Nokogiri to validate an XML document against an XSD schema. It...
Note that this sounds good but is not good at all when hooking tasks on cap deploy (see this article...
This note describes a Cucumber step definition that lets you say: Then "Mow lawn" should be an option for "Activity...
When you use the send_file method to send a local file to the browser, you can save resources on...
This card describes a Cucumber step that lets you say: When I perform basic authentication as "username/password" and I visit...
In case https://www.rubydoc.info/ is to slow or offline, you can also read a gem documentation offline. Start a server...
I love ETags, but there’s something that annoys me: most implementations revolve around pulling a record out of a...
This is for those who already own an SSL certificate (e.g. using it in the Apache HTTP Server) and need...
When you are using Apache for development, it still accepts connections from everyone in the same network as you.
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 eagerly load an association list using the .include option, and at the same time have a .where on...
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...
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...
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.