A jQuery plugin pattern every jQuery plugin should use

jQuery plugins often need a consistent architecture to stay customizable and extensible. A standard plugin pattern helps avoid rigid, hard-to-maintain implementations.

Get rid of WARNING: Nokogiri was built against LibXML version 2.7.7, but has dynamically loaded 2.7.8

Nokogiri can warn when it was built against one LibXML version but loads another, often after upgrades or mismatched gems. Rebuilding or reinstalling the gem usually resolves it.

Howto transfer a single mysql table between several deployment stages

Copy a single MySQL table between deployment stages by dumping it from one database and importing it into another; imports overwrite existing tables, not merge them.

Asset pipeline may break Javascript for IE (but only on production)

JavaScript can break in Internet Explorer only after Rails asset compression in staging or production. Switching from UglifyJS to YUI Compressor can avoid these failures.

Cucumber step to interact with an iframe using Capybara webdriver

Capybara Cucumber steps can target a named iframe by switching Selenium into the frame, letting actions and assertions run inside embedded content.

Machinist blueprints do not work with a column :display

display conflicts with a reserved Machinist blueprint name, so a blueprint attribute using that label may fail unexpectedly.

Unsaved record disappears when assigning to an association

A belongs_to association can return nil after assigning a new record when the association is declared incorrectly. Using the symbol form belongs_to :avatar avoids the disappearing unsaved record.

exception_notification: Send exception mails in models

ExceptionNotifier.notify_exception sends failure emails from model code by handing it an exception object; older versions used ExceptionNotifier::Notifier.background_exception_notification.

Git: How to look at the stash

Viewing saved Git changes without applying them helps inspect unfinished work and compare older stashed revisions with git stash show, tig, or gitg.

Migrating to Spreewald

Migrating an existing cucumber test suite to Spreewald reduces custom step definitions by replacing web, email, shared, and table steps with built-in support.

How to not leave trailing whitespace (using your editor or Git)

Trailing whitespace causes noisy diffs and avoidable commit failures; editors or Git hooks can remove it automatically or block commits with git diff --check.

Using before(:context) / before(:all) in RSpec will cause you lots of trouble unless you know what you are doing

before(:context) in RSpec runs once outside transactions and can leak data between examples; before(:example) keeps specs isolated and safer.

Paperclip: undefined method `to_file' for #<Paperclip::Attachment:0000> (NoMethodError)

Paperclip 3.0.1 removed to_file, breaking code that reads attachment storage through File; Paperclip.io_adapters.for(file).read is the replacement.

Git basics: checkout vs. reset

git checkout and git reset both move pointers, but one restores files or switches branches while the other rewinds the current branch state.

CSS Animations Media Queries

CSS transitions make responsive sites feel smoother and more polished with minimal effort.

ActionMailer sometimes breaks e-mails with multiple recipients in Rails 2

Rails 2 mail sending can produce malformed headers for multiple recipients because a buggy TMail version inserts a blank line. A maintained fork fixes the issue when no MTA repairs it.

How to convert an OpenStruct to a Hash

Convert OpenStruct instances to a hash with to_h; older Ruby versions use marshal_dump to access the underlying data.

Distribute files from a private bucket on AWS S3

Private S3 files can be streamed with time-limited URLs instead of exposing a reusable bucket link. expiring_url and query string authentication help prevent easy redistribution.

Create autocompletion dropdown for Cucumber paths in Textmate

TextMate Cucumber path completion speeds step entry by inserting known route names from features/support/paths.rb while you type.

BigVideo.js - The jQuery Plugin for Big Background Video

BigVideo.js adds fit-to-fill background video or image playback for websites, with support for silent ambient loops and video playlists when autoplay is unavailable.

Highlight current navigation item with Staticmatic

Style the active navigation item in StaticMatic by checking the current page path and assigning a CSS class conditionally.

"command not found" bash function

Customize Bash’s command_not_found_handle to intercept unknown commands and turn them into SSH connections, including support for passing options such as a custom port.

See which MySQL database is currently in use

In the MySQL console, SELECT database(); returns the currently selected database, helping confirm the active schema before running queries.

Test meta-refresh redirects with Cucumber

Capybara step for asserting a meta refresh redirect in the page head during Cucumber feature tests.