highscalability.com

Awesome battle report from Pinterest trying to scale their setup using different approaches. When you push something to the limit...

stackoverflow.com

When you use ab to do some performance benchmarking, you might run into output like this: Complete requests: 200

Find out in this short guide, how to horizontally center a absolute positioned container with CSS. Note: We have a...

The way Rational#to_s works on Ruby has changed from Ruby 1.9 on. Here is how to get the...

In Ruby 1.9, instance_eval calls the block the with receiver as the first argument: In Ruby 1.8, receiver.instance_eval...

So you want to find out how many horizontal pixels you have available on a mobile device. This is super...

ruby-doc.org

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

josh.github.io

li.active a:link Example output (specificity): | 0 | 2 | 2 | See also: https://www.codecaptain.io/tools/css-specificity-calculator

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

The basic idea is pretty simple: an element's height is accessible via the offsetHeight property, its drawn height via...

makandra dev
httpd.apache.org

Debugging .htaccess is hell, and RewriteRules in particular if they are not working as expected. But fear not! RewriteLog will...

ActiveRecord has a feature called counter caching where the containing record in a has_many relationship caches the...

When you have two models in a has_many, has_one or belongs_to association, the :inverse_of option in...

Generally, Selenium tests use the browser to interact with the page. If it's unavailable, a timeout error is...

Why is this useful? You can have a background image on the same element, overlaying it with a transparent gradient...

When is this useful? When both parent and child elements have borders, with this technique you don't get two...

Ruby's mathn library changes Fixnum division to work with exact Rationals, so 2 / 3 => 0 2 / 3 * 3 => 0...

makandra dev

Browsing the git stash is a bit tricky. Here is how to see the changes without applying them:

There is no reason to leave trailing whitespace characters in your project's files, so don't add any.

Given you store files on Amazon S3 and you need to stream those files out to people while you don...

makandra dev

This article describes how to reset MySQL's or MariaDB's root password on your workstation. It's meant for...

Assuming the following sunspot setup of the post class: class Post < ActiveRecord::Base searchable do text :title string :state

In Rails 3.1+, instead of defining a separate up and down method you can define a single method change:

Sometimes you need to remove high Unicode characters from a string, so all characters have a code point between 0...