Copy & Paste & The Web | CSS-Tricks

Controlling copy and paste on the web can improve user flows and enable custom clipboard behavior. Modern JavaScript can trigger copy actions without Flash.

Fix: Capybara is very slow when filling out fields in large forms

Large forms can make Capybara input filling painfully slow because field lookup builds costly XPath queries. A custom fill_in patch can restore usable test speed.

input: A DOM event that is fired whenever a text field changes

input fires while a text field is edited, unlike change, and can replace polling for IE9+; it does not trigger for check boxes.

When should you use DateTime and when should you use Time?

Choosing the wrong Rails date and time type can cause subtle bugs in storage, comparisons, and timezone handling. Time suits most application timestamps; DateTime is for specialized calendar use.

Rails 3 ActiveRecord::Persistence#becomes does not copy changed attributes

ActiveRecord::Base#becomes leaves changed attribute tracking inconsistent, which can break attribute_was checks after casting models with defaults. ActiveType.cast is often the safer alternative.

Rails 4.1+ automatically detects the :inverse_of an association

Rails 4.1 infers association inverses automatically, but failures are silent and extra options can block detection. Setting :inverse_of manually remains safer.

High Performance Browser Networking: HTTP/2

HTTP/2 reduces HTTP/1.1 workarounds and shifts optimization into the transport layer, improving application speed, simplicity, and robustness while enabling new performance gains.

HTTP/2 is here, let's optimize!

HTTP/2 changes long-held optimization rules, making some common performance tricks counterproductive for modern web delivery.

Material icons - Google Design

Google’s icon library offers PNG, SVG and icon font formats, but quality and selection may be weaker than familiar alternatives such as Font Awesome.

Exception Notifier: Foreground vs. background sections

Background jobs can make Exception Notifier crash if foreground settings like request are used, so foreground and background mail sections must be configured separately.

Understanding Ruby Singleton Classes

Ruby singleton classes provide per-object behavior and metaprogramming hooks for adding methods to a single instance or class.

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.