HTML5 and Web Video: Questions for the Industry from the Community

What are Google’s plans for turning WebM into a genuinely open standard, one that is based on consensus like the rest of W3C’s HTML5 effort? Would Google fully support such an effort? Even the WebM project’s domain is controlled by Google. Google chose to release WebM under the Creative Commons license which would theoretically allow a standards body to use the specification as a basis for a truly open standard. Would Google agree to adopt the specification and changes that would emerge from an open process in a timely and robust manner? Wha...

Encrypt files using OpenSSL

Protect files with AES-256 encryption via openssl enc, using a long passphrase file and secure deletion to limit recovery of the original data.

Securely remove files on Linux

rm leaves file data recoverable; shred overwrites files before deletion, while wipe handles directories. Flash storage still needs disk encryption for reliable erasure.

Upgrade from Rails 2.3.10 to Rails 2.3.11

A Rails 2.3.10 to 2.3.11 upgrade can reduce maintenance risk and keep an older application on a supported patch level.

Dump your database with dumple

dumple creates a database dump from a project directory on local machines or application servers, including deployment-time use.

Validate an XML document against an XSD schema with Ruby and Nokogiri

XML files can fail schema checks silently in Ruby; Nokogiri validates documents against XSD and returns syntax errors for reporting.

Continously run command under bash

Sometimes you want to run a command forever, e.g. to compile a haml to html file on the console. Use this:

$ while(true) do haml index.haml index.html; sleep 1.5; done

Cucumber fails without giving error message

Cucumber can fail with little or no visible error output; a backtrace, verbose formatter, or debug mode can expose the underlying cause.

Linux: rename or change extension of multiple files

Bulk file renaming on Linux is error-prone with shell wildcards; Perl rename can change extensions or strip filename prefixes in one command.

Deploy and migrate with a single Capistrano command

Run database migrations during deployment with cap deploy:migrations to restart an application after schema changes, but task hooks can make the sequence unsafe.

Show the description of a Capistrano task

In order to bring up a textual description of a Capistrano task you can say

cap -e taskname

... where taskname is the name of the task you're not sure about.

Auto-hide player controls in the default Flash video player component

Hiding the default Flash video player's controls keeps the skin from staying visible during playback. Set skinAutoHide to true in the component inspector.

Test that a select field contains an option with Cucumber

Cucumber steps can verify that a form select contains or excludes a specific option, without checking the currently selected value.

Fix errors when rendering PDF output

If you run specs or your application and get an error like:
ActionController::MissingFile in 'ProductsController#show, should render PDF'
Cannot read file /some/file.pdf

You may be missing the HTMLDOC binary on your system. Install it like this on Debian/Ubuntu:
sudo apt-get install htmldoc

Show the name and version of your Linux distribution

Get the Linux distribution name and version from release files with a single command.

hyphenator

Javascript that implements client-side hyphenation of HTML-Documents.

remove_index fails silently for non-existing indexes in Rails 2 migrations

When you try to remove a non-existing index using remove_index, the migration will incorrectly pass without an error. The schema will not be changed, but the migration will be considered migrated.

Since this might be fixed in the future, you cannot mend your database by adding another migration on top of the faulty one. You should manually alter the database schema to the previous migration on all machines that migrated the faulty migration (inform your fellow developers), then delete the faulty migration from the repository.

The Case Against Queues

Networked message queues often encourage overengineered systems and operational headaches, adding latency, hidden complexity, and 4AM incidents instead of solving communication problems.

Using Firebug Lite to inspect HTML in Internet Explorer and other browsers

Firebug Lite brings Firebug-style DOM inspection to Internet Explorer and other browsers, including older IE versions, using a JavaScript bookmarklet.

babushka: test-driven sysadmin

The idea is this: you take a job that you'd rather not do manually, and describe it to babushka using its DSL. The way it works, babushka not only knows how to accomplish each part of the job, it also knows how to check if each part is already done. You're teaching babushka to achieve an end goal with whatever runtime conditions you throw at it, not just to perform the task that would get you there from the very start.

OscarGodson/jKey - GitHub

jQuery plugin to register callback functions to keyboard shortkuts. Keyboard events in vanilla Javascripts are super-painful to work with, so hopefully this library can help.

The Difference Between jQuery’s .bind(), .live(), and .delegate()

The difference between .bind(), .live(), and .delegate() is not always apparent. Having a clear understanding of all the differences, though, will help us write more concise code and prevent bugs from popping up in our interactive applications.

Calling selected methods of a module from another module

Need access to only a few methods from another module without exposing them all; module_function makes selected methods callable externally while keeping the rest private.

Split an array into groups

Ruby arrays can be split into fixed-size groups or a chosen number of groups with ActiveSupport, padding or omitting leftovers as needed.