xterm: Have a black background by default
Set xterm’s default colors in ~/.Xresources to avoid black text on white backgrounds; xrdb applies the settings to the current X session.
How to fix Passenger "Unexpected end-of-file detected" error
Passenger can fail with a misleading EOF error when the app spawner exits unexpectedly, often because a gem is missing. bundle install usually resolves it.
Validate attachment presence using paperclip
Paperclip attachment presence validation depends on has_attached_file being declared first; conditional validation with :if also works.
LibreOffice Calc: How to paste cells without overwriting other cells
Calc pastes normally overwrite existing spreadsheet cells; inserting clipboard cells instead shifts surrounding cells down or right.
Building Gem 'RedCloth' with Bundler and GCC 4.6
RedCloth can fail to install through Bundler on older GCC toolchains; adding a build flag suppresses warnings during compilation.
Issue with an escaped "equals" sign in the development log email representation
Quoted-printable encoding turns = into =3D in development email logs, which can make token values look longer than they are.
Shell script to deploy changes to production and not shoot yourself in the foot
A geordi command streamlines safe production releases by comparing master and production, confirming the merge, then pushing and deploying migrations with Capistrano.
Move page breaks in LibreOffice Calc
Printed spreadsheet areas in LibreOffice Calc can be adjusted by moving page breaks in preview and changing sheet scaling settings.
Fix warning: Cucumber-rails required outside of env.rb
Bundler 1.1 can trigger a misleading Cucumber warning during test runs; disabling automatic loading for cucumber-rails removes it without moving the gem into a test group.
Todo.txt: Future-proof task tracking in a file you control
Plain-text task lists stay portable across devices and apps, with Dropbox sync, mobile editing, and a CLI for quick task management; nesting is not supported.
validates_acceptance_of is skipped when the attribute is nil
validates_acceptance_of silently skips nil attributes, so a missing checkbox or typo can leave acceptance unchecked; a boolean field with validates_presence_of is safer.
Git: Push a new branch and track it immediately
New branches pushed to origin do not track a remote branch by default, so git pull cannot follow their upstream; git push -u sets the tracking reference immediately.
Define a route that only responds to a specific format
Constrain a Rails route to a single response format such as XML when one URL must serve only that representation.
MySQL shell: Vertical vs horizontal layout
\G in the MySQL shell switches query output to a vertical format, which is easier to read for wide rows or long text fields.
Tabs in Textarea Plugin for jQuery
Use Tab and Shift+Tab in regular textareas to indent or outdent code for in-browser editing of HTML, CSS, JavaScript, or server-side languages.
Ruby: Find the most common string from an array
Find the most frequent string in an array without failing on empty input; the approach uses grouping and returns the first value from the largest group.
KeyboardJS
JavaScript key binding library for handling single keys and key combinations in web apps.
Show MySQL process list without sleeping connections
Filter MySQL connections to hide idle sessions and focus on active or slow queries, with flexible sorting and column selection via information_schema.processlist.
Change how Capybara sees or ignores hidden elements
Capybara’s default hidden-element handling affects DOM queries globally, while :visible scopes visibility checks to one lookup. Driver-specific visibility rules differ between RackTest and Selenium.
Hack-fix Selenium::WebDriver::Element#select is deprecated
Temporary monkey patch for older Capybara and selenium-webdriver versions to suppress repeated deprecation warnings from Selenium::WebDriver::Element#select.
VirtualBox host IP address and hostname
VirtualBox NAT guests can reach the host at 10.0.2.2; vbox.srv is the matching hostname for shared folders and host web server access.
Customize path for Capybara "show me the page" files
Capybara's save_and_open_page files can clutter the Rails root when debugging Cucumber scenarios. Set Capybara.save_and_open_page_path to store them elsewhere.
Connecting the "sequel" gem to MSSQL via ODBC
Connecting Ruby applications to SQL Server through ODBC can unblock legacy setups when native adapters fail. sequel can use an existing ODBC DSN for database access.
Fix [RubyODBC]Cannot allocate SQLHENV when connecting to MSSQL 2005 with Ruby 1.8.7. on Ubuntu 10.10
RubyODBC fails to create an ODBC environment handle when connecting Ruby 1.8.7 on Ubuntu 10.10 to SQL Server 2005; rebuilding the gem with the correct unixODBC path restores connectivity.