If you ever needed a way to render a Rails assets to a string, Hongli Lai from Phusion describes how. 🙂
I prepared a Gist wrapping it into a nice helper. 😀
# thanks to http://blog.phusion.nl/2011/08/14/rendering-rails-3-1-assets-to-string/
# you may need to change the owner of the tmp/cache/* directories to the web servers user
# e.g. for Debian systems: `chown -R www-data:www-data tmp/cache/*`
Just realized Ruby’s File.basename can also filter out (arbitrary) file extensions. 😀
File.basename("foo/bar/baz.html", ".*") #=> "baz"
Hunting down and fixing this bug took half of my day … 🙁
Awesome work by Scott Chacon: the Git homepage was completely revamped. 😀
I coincidentally stumbled across two instances where (alleged) terrorists are given the chance to explain themselves in court:
What the “islamist” terrorist said vs. what the “ultra nationalist” terrorist said.
APOD picked up a nice cartoon by PHD comics explaining the search for the Higgs Boson at the LHC.