Connect to a VirtualBox guest machine over the network

A VirtualBox guest can be reachable on its own LAN IP by switching the adapter to bridged networking, enabling HTTP, SSH, and other direct connections.

Make Type 1 fonts (.pfb/.pfm) appear in OpenOffice on Ubuntu Linux

Type 1 fonts may not appear in OpenOffice on Ubuntu because missing metric files prevent recognition. t1lib-bin and .afm generation make them available.

Give table columns equal width using CSS

table-layout: fixed makes a table divide its width evenly across columns, avoiding uneven sizing when equal column widths are needed.

Cucumber.yml was found, but could not be parsed.

cucumber fails because cucumber.yml cannot be parsed; removing rerun.txt in the Rails directory often fixes the invalid rerun state.

/proc/cpuinfo on Solaris

Solaris does not provide /proc/cpuinfo; psrinfo -v is the standard way to inspect processor status and speed.

Stub methods on any instance of a class in Rspec 1 and Rspec 2

Stub a method on every instance of a class to control behavior in tests, using stub_any_instance, any_instance.stub, or allow_any_instance_of.

Solve screen error "Cannot open your terminal '/dev/pts/0' - please check"

screen can fail with “Cannot open your terminal '/dev/pts/0'” after switching users in the same session; owning the shell correctly or reconnecting as the target user avoids it.

Show the character set and the collation of your MySQL tables

MySQL table collation and default character set are available through SHOW TABLE STATUS and SHOW CREATE TABLE; individual columns can still use different encodings.

Show and change MySQL default character set

MySQL character-set mismatches cause garbled text and inconsistent comparisons; SHOW VARIABLES LIKE 'char%' and my.cnf settings reveal and change the server defaults.

Creating a patch in git and how to apply patches

Shareable Git changes can be turned into patch files and reapplied in another working tree or repository. git apply stages changes as edits; git am recreates commits with messages.

Stub a request's IP address in a Cucumber scenario

Force a fixed client IP in Cucumber scenarios when request-dependent code needs predictable behavior.

Ruby 2.0 Implementation Work Begins: What is Ruby 2.0 and What’s New?

Ruby 2.0 adds syntax changes, new features, and general improvements while remaining backward compatible with Ruby 1.9.3.

Run multiple local webricks at the same time using different ports

Run several local Rails servers at once by assigning each webrick instance a different port.

Using :dependent => :destroy – Issues with 'code arrangement' or 'cached objects'

dependent: :destroy runs in before_destroy, so callback order can change destruction behavior. Cached associations may destroy records unless they are reloaded first.

Fix multiple CKEditor instances using jQuery adapter - fixed since 4.2

jQuery adapter use can break CKEditor form submission, sending original textarea values instead of edited content when multiple instances share the built-in save path.

Parse & sort unique hits in logfiles

Count unique website hits per URL from logfiles by collapsing repeated requests from the same IP on a chosen date.

How to install a debian/ubuntu package without dependencies

Install a Debian or Ubuntu .deb even when dependency checks fail by modifying the package metadata; risky and can break the system.

Paste X selections into your terminal with your keyboard

X text selection can be pasted into a terminal with Shift + Insert, avoiding mouse-driven copy-and-paste for selected text.

Newly installed Android SDKs don't appear as build targets in Eclipse

New Android SDKs may stay hidden from Eclipse build targets until the IDE is restarted.

Javascript equivalent of Ruby's array.collect(&:method)

Calling a method on every element and collecting the results into a new array has no native JavaScript shorthand; library helpers like pluck fill the gap for property values.

Rails logs are not flushed automatically (in Rake tasks)

Production Rake tasks can lose Rails log output because the logger buffers lines and does not flush on exit. Rails.logger.flush or a task wrapper writes pending entries to disk.

Monitor a Rake task with God

Background Rake jobs can be tracked by God when the task writes its PID to a file path God expects; the process can then be restarted if it stops.

You can use any RSpec matcher to match arguments of method calls

RSpec method expectations can match arguments with any matcher, not just anything or hash_including, making loose argument checks more expressive.

Don't call gsub on safe strings

Calling gsub on html_safe strings can break backreferences like $1 and leave matches unusable. html_safe strings need special handling after substitution.