Querying model errors in Rails 4

ActiveModel::Errors behaves like a hash for storing and querying validation messages on model attributes in Rails 4.

Reverse-proxying web applications with Apache 2.4+

Apache 2.4+ can act as a reverse proxy for apps on other hosts or paths, including redirect, cookie, and asset-path rewriting when the backend is not proxy-aware.

Gatekeeping: Guide for gatekeeper

Project code is reviewed before staging to catch client rejections early and keep changes maintainable. Gatekeepers approve or reject merge requests and decide whether a review is needed.

Manually trigger a delegated DOM event

Delegated jQuery events can be hard to fire programmatically for testing; native dispatchEvent with the right event class works better than trigger in many cases.

Show details of TLS/SSL connections of remote hosts

sslscan reports TLS/SSL cipher support and certificate details for remote hosts, helping identify weak protocols, preferred ciphers, and certificate validity.

Upgrading from Capistrano 2 to 3

Capistrano 3 replaces the old DSL with Rake and SSHKit, changing task syntax, hooks, server settings, and file layout during migration from Capistrano 2.

CucumberFactory 1.11 lets you use FactoryGirl traits

CucumberFactory 1.11 adds support for FactoryGirl traits, letting Cucumber steps create records with named variations such as vintage and moody.

Cucumber step to pick a datetime in Rails' horrible datetime_select

datetime_select creates a clumsy date and time chooser in Rails; a visual picker is usually better, but a Cucumber step can still drive it.

has_defaults 0.4.2 lets you use dagger lambdas

has_defaults 0.4.2 evaluates default-value lambdas with instance_exec, enabling zero-argument lambdas and procs for computed attributes.

Savon testing: How to expect any message

Savon mocks usually require an exact SOAP request body, but message: :any accepts any payload and returns the stubbed XML.

Ubuntu: Make Ctrl-Space work in RubyMine, Emacs, or other tools

Ubuntu can intercept Ctrl+Space for input-method switching, breaking autocomplete in RubyMine and other apps. Changing the iBus shortcut restores the keybinding.

Detect recently added vdisks in a VMware ESXi linux guest

New vdisks may not appear inside a VMware ESXi Linux guest until a SCSI rescan is forced on the correct host bus.

Customizable date (and time) picker: Rome

Flexible date and time input with basic localization and validation, but limited template and event customization for heavily tailored interfaces.

LibreOffice / Excel: Use tables like a hash map in formulas with VLOOKUP

VLOOKUP turns a two-column range into a lookup table for matching keys to returned values in LibreOffice and Excel.

Clusterize.js

Small JavaScript library for rendering huge tables and lists by keeping only visible rows in the DOM, reducing browser load for data-heavy views.

Testing setTimeout and setInterval with Jasmine

jasmine.clock() lets tests fast-forward timers and trigger setTimeout or setInterval callbacks without waiting in real time.

Why you see a GET "/__identify__" request in Capybara tests

Unexpected GET /__identify__ requests in Capybara test logs come from server readiness checks for Selenium-style drivers; Capybara answers them with middleware when no route exists.

The Ruby Toolbox – a collection of good gems

Curated gem rankings help you discover active Ruby libraries by category when you need a package for a specific task.

TrackDuck: Visual feedback for web design and development

Collect visual user feedback on web pages with one embedded button; users can capture screenshots and leave comments for designers and developers.

A solid and unobtrusive plugin for form field placeholders

jQuery plugin for placeholder text in browsers without native HTML5 support, including IE6. Skips elements that already support the placeholder attribute.

Ruby bug: Symbolized Strings Break Keyword Arguments in Ruby 2.2

Dynamically created symbols can make keyword arguments turn nil in Ruby 2.2 when a method uses several keywords and **options.

Make timestamp of dmesg in Ubuntu human readable

dmesg timestamps are hard to read in uptime-based form; dmesg -T converts them to human-readable date and time.

Using mime types with send_file

Rails file downloads need correct MIME mappings so browsers can open attachments directly instead of forcing a save dialog.

Unfreeze a frozen ActiveRecord

Frozen ActiveRecord instances raise can't modify frozen hash when attributes change; dup usually creates an unfrozen shallow copy, though Rails 2.3.x has a bug.