New Cucumber Factory makes it easier to associate records
Cucumber Factory now links records by any string attribute, reducing the need to assign explicit names when reusing previously created objects in feature scenarios.
15 criteria for evaluating software product ideas
Choosing the right product to develop is crucial. Great execution is also very important. But if you develop a product that no-one wants or no-one is prepared to pay for, then you are going to fail, no matter how well you execute it. You can often tweak a product or its marketing to make it more successful based on market feedback (‘pivot’) . But the less pivoting you have to do, the better. Below I list some of the criteria I think are important for evaluating the potential of new commercial software products.
Example .ssh/config file
A reusable ~/.ssh/config template can simplify SSH access with host aliases and keepalive settings, then be adapted to personal needs.
A nicer way to run RSpec and/or Cucumber
Convenience scripts streamline RSpec and Cucumber runs with bundle exec, parallel execution, spinner support, and a full test check against regressions.
Don't forget to add ":dependent => :destroy" for join models
Join records can be left behind when parent records are deleted, causing orphaned data and inconsistent associations. :dependent => :destroy removes them automatically.
Dynamically skip Capistrano hooks
Avoid repeated remote database dumps during Capistrano deployments by skipping the db:dump hook with a deploy flag or environment variable.
Mark up text in Balsamiq Mockups
Inline markup in Balsamiq Mockups adds bold, italic, and hyperlink styling to editable text; bold often looks unchanged because many widgets already use bold fonts.
How to: Classic scrollbars in Ubuntu 11.04
Ubuntu Natty's hidden GTK scrollbars can be removed when classic scrollbars are preferred. Purging liboverlay-scrollbar-* restores the old behavior after restarting apps or logging in again.
Files open with an error "the location is not a folder" after installing XFCE
Files and browser downloads may fail to open after installing XFCE because exo-utils conflicts with gnome-open; removing the package resolves the folder-location error.
Commonly used regular expressions - Cheatsheet
Common validation patterns for host names, German bank data, postal codes, hex colors and IPv4 addresses, plus reusable constants in a Pattern class.
Fixing: no sound on front audio in Ubuntu 11.04
Front audio output can stay silent while the mic works because a separate headphone path is enabled. Changing the audio mixer setting restores all outputs.
Printing to PDF files on Ubuntu
Create a virtual printer that saves print jobs as PDF files on Ubuntu, with output written automatically to ~/PDF/.
List directories ordered by size (with human-readable output)
Find the largest or smallest directories in a tree by combining du with sort -h for human-readable size ordering.
How to test resource_controller hooks
Testing resource_controller callbacks directly avoids triggering the action path and verifies hook behavior in controller specs.
Check apache config files' syntax
Validate Apache configuration syntax with apache2ctl configtest or apache2ctl -t; passing checks do not guarantee a successful server start.
SSL: Build a Certificate signing request (CSR)
Creating a CSR and private key for an SSL certificate requires careful server-side generation; the common name must match the domain exactly or the certificate becomes invalid.
Soft-scroll to an anchor with jQuery
Links with anchor targets can jump abruptly; jQuery animation creates smooth scrolling to the destination and can preserve the URL hash.
Semantic markup standard for search engines
Structured data on web pages helps search engines display richer results for people looking for contact details, places, events, or products.
Alternative to #to_a and Array(...)
Turning arbitrary values into arrays can trigger to_a deprecation warnings and inconsistent nil behavior. Array.wrap or listify provide a safer conversion.
Open a new tab with the current directory on a mac
Open a new Terminal tab in the current directory and optionally run a command there using a simple tab script.
Matching elements on complex web pages with Webrat
XPath matchers can be combined with CSS-selector matchers. This is really useful if not, for example, the content of an element should be matched but the element itself like in the following example. Here a form is used to display data as default value in its input elements. This can be the case in web applications in which data should be edited easily without additional clicks.
Enable soft tabs in Vim
Tabs in Vim can be replaced with spaces for consistent indentation across files and platforms, with permanent or temporary settings.
Dump a two-dimensional array to an Excel .xls spreadsheet
Ruby code exports a two-dimensional array to an Excel .xls file with a single method call, with the first row used as a bold header. spreadsheet is required and XLS sheets are limited to 65,535 rows.