Avoiding nested blocks
Today I had to silence some output streams so that messages don’t pollute the STDOUT. I used the silence_stream method built into Rails, described well in this article.
silence_stream(STDOUT) do # …my code… end
Very nice, except I also wanted to filter STDERR output. Not a problem.
silence_stream(STDOUT, STDERR) do # …my code… end
Well, [...]
Dumb tester_elf
This tester_elf script is very dumb, which is uncharacteristic of elves in general. Why did I name it tester_elf? Well, it’s a Santa’s little helper type of elf as opposed to an individual of Tolkien’s highly cultural race. I do crave some nice D&D RPG experience but there aren’t any good new games in that [...]
yui_compressor_fu
Please welcome a new thingie I just released – yui_compressor_fu.
Point
yui_compressor_fu delicately minifies all your assets (linked with javascript_include_tag, stylesheet_link_tag helpers) with YUI Compressor. It abides Rails caching rules. All you have to do is install the plugin, and minifying will automatically kick-in when rails performs its normal caching routines.
Tale
Today I was having my usual cup [...]