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.

Fix error: Invalid gemspec / Illformed requirement

Broken gem specifications trigger “Invalid gemspec” and “Illformed requirement” errors; updating Rubygems, removing corrupted gem files, and reinstalling fixes Bundler failures.

Manage ssh keys with Keychain

Keychain keeps ssh-agent and GPG keys running across sessions so passphrases are entered only once after reboot, and remote jobs can use existing key-based logins.

Meny - A three dimensional and space efficient menu concept

Three-dimensional menus can now render in WebKit browsers, Firefox, and IE10, making compact navigation possible in limited space.

Updated: Unobtrusive jQuery to toggle visibility with selects and checkboxes

Show or hide page sections based on form choices, including radio buttons, without intrusive scripting.

Paperclip: Move attachements from local storage to AWS S3

Migrating Paperclip attachments from local disk to Amazon S3 avoids manual reuploads and keeps existing files available through the S3 storage adapter.

"rake gettext:findpo" running forever

gettext_i18n_rails can enter a near-infinite loop during rake gettext:findpo when Haml strings mix escaped UTF-8 characters and #{} interpolation.

Evening on Backbone.js/Views w/ Q&A with David Heinemeier Hansson - YouTube

Basecamp stays fast with little JavaScript by combining server-rendered pages, PJAX, and Russian doll caching to reduce client-side work.

defunkt/jquery-pjax

pjax loads HTML into the current page without a full reload, preserving permalinks, page titles, and back-button behavior with graceful fallback.

Beware of magic adblocker rules

Ad blockers can hide legitimate site content when generic names like sponsor or banner match built-in filters. Renaming affected elements or directories usually restores visibility.

How to fix gsub on SafeBuffer objects

html_safe strings lose $1 and other match variables inside gsub blocks. A SafeBuffer override can restore access to capture groups during replacements.

Hack of the day: Find all classes that define a method with a given name

Find every class or module that implements a given instance method by scanning Ruby's object space and checking method ownership.

Boolean fields in migrations

Updating boolean columns in a migration needs database-specific true/false values; quoted_true and quoted_false return the correct representations in Rails.

How to deal with strange errors from WEBrick

WEBrick can emit unreadable URI and request-line errors when a browser connects with HTTPS; switching the URL to http avoids the SSL mismatch.

How to test print stylesheets with Cucumber and Capybara

Print stylesheets often regress as apps evolve, leaving paper output cluttered or unreadable. Cucumber and Capybara can verify visible content, white backgrounds, and hidden controls.

Reset mysql root password

MySQL or MariaDB root access can break after password loss or unix_socket authentication changes on a local workstation. Root credentials can be reset or switched back to password login.

Be careful when using Unicode symbols for graphical elements

Unicode symbols used as graphics can render inconsistently across Linux, Windows, and macOS because browsers fall back to different fonts for missing characters.

Flat Icons & Icon Fonts | CSS-Tricks

Icon font sets provide scalable symbols for interfaces, with Font Awesome as a commonly recommended option.