Consul 0.6.1+ gives your Power class a number of static methods that behave neutrally in case Power.current is nil. This...

developers.google.com

The attached article outlines considerations when choosing client-side vs. server-side implementations of the Google Geocoding APIs (geocoder, directions...

Apache HTTP server benchmarking tool (ab) is a nice tool to test performance on sites delivered by HTTP. If the...

ruby-doc.org

If you use Tempfile and pass your own filename containing an extension, it will just be consumed by the Tempfile...

Use Socket.gethostname. So for a machine whose hostname is "happycat", it will look like this: >> Socket.gethostname => "happycat" That should work...

Microsoft Office pre-fetches hyperlinks using an internal DLL (which doesn't know about your cookies), follows all redirects and...

When you have a Pull Request on GitHub that includes commits from another Pull Request, you will still see them...

As attachments to this card you will find a Cucumber feature and supplementing step definition that you can use to...

Sometimes you want to see what data you get through a TCP or UDP connection. For example, you want to...

makandra dev

The bash offers control over the behavior of autocompletion. The most primitive example is this (just run it in your...

When searching for text in a MySQL table, you have two choices: The LIKE operator FULLTEXT indexes (which currently only...

makandra dev

Basic error pages To add a few basic styles to the default error pages in Rails, just edit the default...

If - for whatever reason - you have to render stylesheets dynamically, the following snippet might be of help. It emulates what...

Git commits should be very deliberate, and only contain changes that you really want to be in there. In order...

If some AJAX functionality does not work, but you see Firefox making an OPTIONS request, the reasons is most likely...

You know that you can force absolute URLs throughout a response. Now you want to modify URLs similarly, but only...

Capybara uses www.example.com as the default hostname when making requests. If your application does something specific on certain hostnames and...

makandra dev
github.com

The gem author Jonas Nicklas highlights in a Google Groups post that the release is not backwards compatible to 1...

Since I use this a lot in my daily work and there were no scripts working properly for me, I...

stevesouders.com

You can use scheme-less URLs (or protocol-relative URLs) to have browsers use the current protocol (HTTP or HTTPS...

developer.mozilla.org

Having your site run on SSL is worthless when you include content over an unsafe connection (HTTP).

If you're using the Capybara webdriver, steps sometimes fail because the browser hasn't finished loading the next page...

stackoverflow.com

url = 'http://www.foocorp.com/foo/bar' URI.parse(url).host # => www.foocorp.com Note that this will raise an error if the given argument is...

If you require your Rails models manually, pay attention to the path you use. Unless you have...