Use CSS "text-overflow" to truncate long texts
Single-line text can overflow its container in Rails views; text-overflow: ellipsis and white-space: nowrap produce cleaner truncation in supported browsers.
Mysql::Error: SAVEPOINT active_record_1 does not exist: ROLLBACK TO SAVEPOINT active_record_1 (ActiveRecord::StatementInvalid)
Parallel test runs can trigger missing-savepoint rollback errors when processes share a database or transactional test settings conflict.
Using Vim to repair files with incorrect character encoding/representation
Fix files whose special characters were saved with the wrong encoding, such as UTF-8 text shown as latin1 mojibake, by reopening them in Vim with the correct file encoding.
Desktop Notifications with WebKit
Chrome supports desktop pop-up notifications through WebKit's webkitNotifications API, letting websites trigger popup bubbles from JavaScript.
Test whether a form field exists with Cucumber and Capybara
Capybara and Cucumber can assert whether a labeled form control is present or absent, with step definitions needing adjustment across older Capybara versions.
Ubuntu: Reload Gnome panel while keeping user session
Restart the GNOME panel without signing out when widgets or the panel cache are stale; killall gnome-panel often brings it back automatically.
paul/progress_bar - GitHub
Simple Ruby console library for showing task progress during long-running jobs with minimal setup.
Sunspot for Solr fails with '400 Bad Request' in 'adapt_response'
Sunspot can fail with 400 Bad Request in adapt_response when Solr uses the wrong schema. Copy Sunspot’s schema.xml into Solr’s config and restart the server.
Why your javascripts should be executed after the dom has been loaded
JavaScript that touches the DOM can run too early and fail before elements exist in the parsed tree. Waiting for DOM ready avoids timing bugs and missing nodes.
Git: Moving a commit between repositories
Move a single Git commit to another repository without adding a remote by exporting a patch and applying it in the target repository.
Associations named using a string cannot be included in a scope
String-based belongs_to associations break eager loading and scope includes in ActiveRecord, causing missing-association errors. Defining associations with symbols avoids the configuration error.
How to combine greps on log files opened with tail -f
Chaining grep with tail -f needs --line-buffered, otherwise matches may not appear immediately in a pipeline.
Git: Diff staged changes
git diff omits staged changes; git diff --cached shows the changes already added to the index and ready for the next commit.
How to create Excel sheets with spreadsheet gem and use number formats for cells like money or date
Create .xls files with the spreadsheet gem and apply number formats for currency and dates, including cell links.
Using Solr with Sunspot
Running Solr with Sunspot adds Rails search, but requires local setup, reindexing, error handling, and production configuration for a separate Solr server.
Opening images with 100% zoom in Photoshop
Photoshop has no preference for opening files at 100% zoom instead of fitting them to the screen. After opening, Ctrl-Alt-0 or the magnifier tool returns to full size.
HTML5 Please: Use the new and shiny responsibly
Check whether HTML5 features are ready for use and how to adopt them safely with polyfills, fallbacks, or native support.
Enabling view rendering for controller specs
Controller specs usually skip template rendering; integrate_views in RSpec 1 or render_views in RSpec 2 enables view rendering for specs that need it.
gammons/fake_arel - GitHub
Backport Rails 3 ActiveRecord querying and chained scopes to Rails 2, including where, order, and to_sql for scopes.
marcandre/backports - GitHub
Provides Ruby 1.9 features for Ruby 1.8 applications, easing upgrades and compatibility gaps without changing the runtime.
colszowka/simplecov - GitHub
Ruby 1.9 code coverage tool with configurable reporting and automatic merging across test suites; rcov remains for Ruby 1.8.
How to install a specific version of RubyGems (and how to downgrade)
Install a chosen RubyGems release for consistent behavior across servers; gem update --system can target an exact version and even downgrade.
jQuery UI Bootstrap
Bootstrap-styled jQuery UI theme with a cleaner look than the default jQuery UI appearance, useful when matching a modern UI without adopting the full Bootstrap framework.