The challenging setup of an offshore project

Offshore agile projects demand more project-management discipline, risk handling, and trade-off decisions, while local client work relies more on relationships and expectation management.

Check whether an element is visible or hidden with Javascript

Visibility checks can differ between DOM APIs and libraries, causing elements to be misclassified as shown or hidden. jQuery, jQuery 3, and Prototype use different rules.

console-for opens a Rails console remotely on a Capistrano deployment target

console-for opens a remote Rails console on a Capistrano deployment target with one command, so staging and other environments can be accessed quickly.

Be careful when closing expanded stories in Pivotal Tracker

Closing an expanded Pivotal Tracker story with the top-left arrow saves changes and can overwrite edits made by others. Use Cancel, Esc, or hover preview to avoid accidental data loss.

Install the SQLite 3 gem for Ruby under Ubuntu

Install the SQLite driver for Ruby on Ubuntu when sqlite3-ruby cannot be used without the SQLite development libraries.

How to fix zero-byte downloads with Rails 3 and Apache / Passenger

Zero-byte downloads in Rails 3 behind Apache/Passenger often come from missing X-Sendfile support, leaving file responses empty.

Test that a string of text is (not) linked in Webrat or Capybara

Cucumber step definitions for asserting whether visible link text is present or absent in Webrat or Capybara using selector-based matchers.

Using Dropbox on Ubuntu

Dropbox can be integrated into Nautilus on Ubuntu for automatic file synchronization without using the web interface. The .deb package installs the client and keeps it updated through an APT source.

Build vs. Buy

Choosing between custom software and a packaged solution depends on whether the supported process is a competitive advantage. Core processes often justify building; others usually fit a standard package better.

How to build the perfect number of blank records for a nested form

Nested forms need enough blank rows for new entries and a sensible minimum total for first-time input; build_nested_records balances both with configurable thresholds.

Force SSH client to use password authentication instead of public key

Password authentication can be tested by forcing SSH to skip public key login and prefer passwords. The same options also work with scp for file copies.

Run Selenium tests in Chrome instead of Firefox

Switching Selenium from Firefox to Chrome requires a matching chromedriver and Capybara driver configuration. Older Capybara versions need a manual Selenium WebDriver setup.

Change the name of your Ubuntu machine

Renaming an Ubuntu machine requires updating /etc/hostname and /etc/hosts; the new hostname takes effect after reboot or with hostname your.hostname.

Linux: Refer to all arguments of a script call

Shell scripts often need to forward every command-line argument without hardcoding positions. $@ expands to all parameters in both sh and bash.

mysqltuner.pl

Perl script for diagnosing MySQL databases and suggesting configuration changes to improve performance.

Hack of the day: A reverse for Rails' &:

Ruby has a reverse of Rails' each(&:method) shorthand for calling an object method with each element: each(&object.method(:call)).

Change the timestamp of a file in Ruby

Set a file's modification time in Ruby with FileUtils.touch; it can create missing files and update multiple paths at once.

See which Rails applications are being served by your Passenger

passenger-memory-stats lists Passenger processes with application directories and memory usage, making it easy to identify which Rails apps are currently served.

Force Google Chrome to run in English on Linux

Google Chrome can inherit a non-English browser language from the Linux locale, which affects sites and Selenium tests. Keeping only en locale files forces Chrome to use English.

What to do when Google only syncs some of your contacts

Google contacts may stop syncing to e-mail clients or phones when they are not in the "My Contacts" group; moving them there restores synchronization.

How to fix: undefined method `specifications' (caused by RubyGems 1.8)

RubyGems 1.8.5 can abort rake tasks with undefined method 'specifications' on /usr/lib/ruby/gems/1.8; a manual patch or version downgrade restores gem path handling.

Sanitize filename with user input

Building filenames from user input can create security issues; a whitelist-based sanitizer replaces unsafe characters and can transliterate Umlauts before saving or downloading.

RubyMine crashes Ubuntu 11.04 window decorator on exit

Java GUI apps can crash Ubuntu 11.04’s window decorator on exit, leaving missing title bars and requiring a temporary restart of the decorator.

How to use helper methods inside a model

Calling view helpers from a model is possible through ApplicationController.helpers, delegation, or a custom proxy when model code needs presentation logic.