Webrat doesn't follow redirect because it considers the url external
Absolute URLs in Rails tests can be treated as external because the host is unknown, breaking redirect handling in Webrat. Use path-only matching or reset Webrat to the local site.
Timecop creates records in the past after calling Timecop.freeze
Timecop 0.3.4 and earlier can create records with timestamps in the past after Timecop.freeze; upgrading to 0.3.5 avoids the bug.
Time#utc, Time#gmt and Time#localtime are destructive methods
Time#utc, Time#gmt and Time#localtime mutate the receiver instead of returning a converted copy, which can cause hidden side effects in shared Time objects.
Convert the colorspace of a PDF from RGB to CMYK under Ubuntu Linux
RGB-to-CMYK PDF conversion usually changes colors because no exact mapping exists; Ghostscript can rewrite the file with CMYK output on Ubuntu Linux.
Rotate a PDF under Ubuntu Linux
Incorrectly oriented PDF pages can be fixed on Ubuntu with pdftk by applying page rotation during output generation.
Fix: Tail says "no space left on device"
tail -f can fail with “no space left on device” when Linux inotify watches are exhausted, often by daemons like Dropbox. Raising fs.inotify.max_user_watches restores file following.
Fix Rubygems warning: Gem.source_index is deprecated, use Specification
Rubygems updates can flood legacy Rails apps with Gem::SourceIndex deprecation warnings. SlimGems or upgrading Rails 2.3.11 to 2.3.12+ reduces the noise.
Who broke the build?
Jenkins build failures trigger an automatic foam missile counter-attack aimed at the developer who broke the build.
Downgrade Firefox 6 to Firefox 5 on Ubuntu
Firefox regression can break Selenium tests after an upgrade; running an older browser is unsupported and may leave the system unstable.
Prevent your Firefox from auto-updating
Freezing Firefox versions for broken Selenium tests is a poor long-term fix because old releases stop receiving security patches. Auto-update can be disabled via about:config, but keeping Firefox current is safer.
An ActiveRecord is invalid, but has no errors
before_validation returning false can make an ActiveRecord object invalid without populating errors, leaving validation failures hard to diagnose.
Distance of time in what you like: days, months, years
Rails’ distance_of_time_in_words can be too imprecise when a fixed unit is needed. A custom helper returns rounded differences in days, months, or years.
Print large PDFs as a poster
Convert a large PDF into tiled pages for printing as a poster using pdfposter; sizing the output can be awkward, but it works for oversized prints.
Best GitHub feature
Repository navigation becomes faster with GitHub’s file-name search shortcut, letting you jump to files immediately instead of scrolling through folders.
Random list of ActiveSupport goodies
Handy ActiveSupport helpers add callbacks, message signing and encryption, ordered options, array wrapping, deep hash merging, whitespace squishing, and zone-aware current time.
How to make a single check box (or image, etc) align vertically
Single inline controls like checkboxes or images can sit top-aligned inside a line-height container when they are alone; adding adjacent inline content or a non-breaking space centers them.
Ruby GetText will eval scripts containing ActiveRecord classes
Ruby-GetText may execute entire files while scanning for ActiveRecord models, so one-off scripts can run during PO rebuilds.
List sizes of MySQL databases
MySQL database directories can misrepresent real storage use when ibdata1 holds the data; querying information_schema.TABLES reveals per-database size in MB.
Grep the number of occurences in a file, counting multiple hits per line
grep -c counts matching lines, not repeated hits on the same line. Inserting line breaks with sed makes every occurrence count.
Solarized color scheme for Rubymine
Solarized support in RubyMine requires importing an IntelliJ port, and selecting a scheme can reset the editor font.
Fix: FreeBSD is not able to connect to the network
FreeBSD systems can fail to get network access even when rc.conf enables DHCP. Starting dhclient manually or rebooting can restore connectivity.
How to change the font in Sublime Text 2
Sublime Text 2 font appearance can be customized through user settings, including typeface and size, with changes applied immediately after saving.
Solve issues with Samsung TV as computer screen
Samsung TVs used as monitors can have audio routing problems, input lag, and oversharp text, and store settings only after leaving store-demo mode.
Create RAID on Amazon EC2 EBS volumes
Software RAID on Amazon EC2 EBS volumes improves I/O for database and other intensive workloads. mdadm creates the array and preserves it across reboots.