How to customize CKEditor dialogs

CKEditor dialog tabs and fields can be adapted to fit a custom editing workflow.

How to fix a corrupt git index

Git index corruption blocks commands like git status and git pull, but uncommitted changes remain. Removing .git/index and resetting the branch restores the repository.

Mac OS X Lion (10.7.2) screws host resolution

Mac OS X Lion 10.7.2 can ignore /etc/hosts and break local name resolution, so Apache virtual hosts and Passenger settings stop working as expected.

turn.js - The page flip effect for HTML5

jQuery plugin that creates a realistic page-flip transition for HTML5 content, suitable for book- or magazine-style browsing in modern browsers.

nruth/show_me_the_cookies - GitHub

Helpers for inspecting and manipulating Capybara browser cookies in integration tests, with support for rack-test and Selenium WebDriver.

Flexible overflow handling with CSS and JavaScript

Truncates one variable-length label while keeping a second label visible on the same line, with a JavaScript fallback for browsers without the needed layout.

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.