Using Apache Benchmark (ab) on sites with authentication

Authenticated pages can be benchmarked with ab by supplying the right session cookies; otherwise login-protected requests fail or measure the wrong content.

Detect effective horizontal pixel width on a mobile device with Javascript

Determining usable horizontal width on mobile is unreliable because device pixels, CSS pixels, and orientation differ across platforms. effectiveDeviceWidth() normalizes screen size with window.orientation and devicePixelRatio.

Git: How to stash with a custom message

Temporary Git changes are hard to identify when stashed frequently; git stash save lets you label them with a custom message.

Ruby: How to ensure a Tempfile's extension

Tempfile may absorb a supplied extension into its generated name, leaving the file without the expected suffix. Passing the basename and extension as an array preserves the extension.

How to get the hostname of the current machine in Rails or a Ruby script

Socket.gethostname returns the current machine’s hostname in Rails or Ruby; hostname is a fallback on Unix-like systems, but may include trailing newline or FQDN.

Consul 0.5.0 is faster for admins, allows to define multiple powers at once

Consul avoids unnecessary queries when a power selects all records, speeding up permission checks for admins. power can now define multiple powers in one block.

Customize tokenization of the MySQL FULLTEXT parser

MySQL FULLTEXT tokenization is hard to tune and can split terms unexpectedly, such as at periods. Normalizing input or moving to Solr can avoid parser limitations.

Fix error: undefined method `desc' for #<Foo::Rake::Taskx1234>

A gem can break on newer Rake versions when it calls desc on Rake::Task; upgrading the gem or pinning rake to 0.8.7 avoids the error.

Fix warning: No secret option provided to Rack::Session::Cookie

Rails with recent Rack versions can emit a session cookie security warning when no secret is configured; locking Rack to 1.4.1 works around the issue.

Mac: Turn applications to Full Screen mode from bash

Make Mac apps enter full screen from bash scripts by calling a small helper script; requires Accessibility access and only works with apps that support full screen.

CSS Explain - A tool which calculates CSS selector specificity

Calculates CSS selector specificity for a given selector, helping diagnose why one rule overrides another in the cascade.

will_paginate can paginate plain Ruby arrays

will_paginate can page plain Ruby arrays, returning a paginated array-like object with total_entries and the same pagination controls as ActiveRecord scopes.

Font Awesome 3.0 has been released

Font Awesome 3.0 adds 40 new icons, CSS animation-based spinning, and a smaller file size; the font can be subset to include only needed icons.

Get Your App Ready for Rails 4

Preparing an existing Rails app for Rails 4 involves updating deprecated APIs, dependencies, and configuration before upgrading the framework.

WORDOID - Creative Naming Service

A cozy place to find a short, catchy name for a product, company, or domain.

Rails 4 Countdown to 2013 | The Remarkable Labs Blog

Ruby on Rails 4 adoption will require updates for many web applications. A 31-day series prepares developers for a smoother upgrade.

Compare two jQuery objects for equality

jQuery creates a new wrapper on each $(...) call, so == fails for matching selections. Use .is() to test whether two jQuery objects wrap the same DOM elements.

5 Design Tips Every Developer Should Know

Visual polish can improve small-team projects and make software feel more successful. Five basic art and design principles help reduce ugly interfaces and weak presentation.

The Shapes of CSS

Pure CSS can render many decorative shapes with a single HTML element, avoiding extra markup for icons, badges, and UI flourishes.

Error installing ffi gem

Installing ffi can fail when the system lacks the libffi development package. Installing libffi-dev on Debian-based systems resolves the missing header/library dependency.

equalize.js

jQuery plugin for matching element heights or widths to create uniform layouts in grids, cards, and columns.

King of Nothing, the DCI paradigm is a scam

Frustration with DCI and Clean Ruby centers on ambitious promises that feel unfinished and oversold in large Ruby on Rails applications.

Git blame: How to ignore white-space modifications

git blame -w ignores whitespace-only changes, keeping authorship attribution on the original code instead of indentation edits. git diff -w does the same for comparisons.