Double Shot #642
I'm about ready for a weekend. Fortunately, I can see one coming.
- Rails 3.0: Beta release - It's out at last. If you're brave enough to try to port a non-toy application you'll probably find the wiki page on plugin and gem status useful.
- jQuery Easy Slides v1.0 - Indeed, an easy slideshow plugin for jQuery.
- Bulletproof backups for MySQL - Step by step on how to set them up sensibly.
- Dynamic Dummy Image Generator - One-step rectangular blank placeholder images for layout testing. Alternatively you can run fakeimage to get the same functionality from your own Sinatra app. (via LifeHacker)
- script/migrator for navigating migrations - Console script to go back and forth in your Rails migrations, from Maxim Chernyak. Looks very useful.
- ZGRViewer - Graphviz visualizer that has some nice zooming and navigation features. I'm trying it out with ERDs generated from Railroad. If you're looking at this stuff for the first time, the Graphviz OS X Builds page and associated FAQ may be useful.
- EventCalendar - A more sophisticated descendant of the old Rails CalendarHelper plugin.
- Trunks - Git, Mercurial, or Subversion source control hosting "at spouse-friendly prices." Free while they're in beta.
Double Shot #641
Sleep seems overrated until you have to skip it for a while.
- gMap - jQuery plugin for Google Maps. Looks way easier than the last way I've done it.
- webtranslateit - Gem to integrate a Rails app with Web Translate It, a web service to help provide localization.
- Why use HAML (and SASS)? I already know HTML. - Another argument in favor of switching to HAML/SASS. This is rapidly becoming the vi vs. emacs of templating languages.
- toto - Blog engine built atop rack and aimed at heroku deployment.
- Ubiquitous Analytics and Tableau Public - This looks nice; the Tableau data visualization app is one of the things I remember from Windows days, and now they're bringing it to the web.
- DTerm - Popup command line for OS X.
Double Shot #640
Sometimes it seems that tomorrow is a long time in coming.
- js.fiddle - Online HTML/CSS/JavaScript editor supporting jQuery, YUI, mooTools, Prototype and more.
- ActiveMerchant 1.5.0 Released - With new gateways and support for Ruby 1.9.
- Announcing Gemcutter/Caliper Integration - Now you can see just how bad the code is in your favorite gem.
- Bayesian Classification on Rails - How to do it.
Double Shot #639
Early morning coding is the most peaceful time of day.
- Elegant Themes Icon Pack, For Free! - Another set of nice-looking 48x48 icons for your apps.
- MyNoSQL - Tracking news and links related to NoSQL, which means I don't have to.
- virtualbox - Ruby gem to control VirtualBox VMs. Also: vboxweb_rb, which layers a Web GUI on top of this.
- Friendly 0.5.0: Offline indexing and more - The NoSQL-in-MySQL project is moving along.
- Rails 3 Upgrade - The PeepCode screencast, for free.
- Rails 3.0 Release Notes - The beta is imminent; the release notes are already live on the test doc server.
- Webiva - Another Rails-backed CMS.
- Line Comments Make Debugging Sass A Breeze - Debugging technique that I didn't know about.
Easy rcov with Test::Unit and Rails 2
Yesterday, I needed test coverage numbers for an application using Rails 2.3 and plain old Test::Unit (still my test framework of choice). This proved to be a good deal more difficult than I expected: there are so many forks of the original rcov code, and so much disparate advice on how to get it hooked up, that I spent a great deal of unprofitable time reading before I got the right combination. Hopefully this short list will save you from doing the same:
- Install the relevance-rcov gem. This is the stable and maintained fork.
- Install the commondream rcov_plugin. This has the best set of working rake tasks I've found.
- Add coverage/* and test/coverage/* to your .gitignore.
- Run rake test:coverage to generate coverage results.
- Open /coverage/index.html in your project to view the results.
Double Shot #638
It's February, and I've got a team of devs coming available for new work. Happy to chat about any prospective projects you might want done.
- Weave 1.0 now available for download - I've been using Weave to sync two copies of Firefox since about 0.2. Works great for me.
- rails-upgrade: Automating a portion of the Rails 3 upgrade process - Jeremy McAnally is working on some tools to make the transition smoother. This quickly got blessed as an official plugin.
- Benchmarking Rake Tasks and Trivial Rails Testing Optimizations - "My tests take too long" is a common lament. Here's some help.
- Colorize - Simple jQuery table formatting plugin.
- Announcing Git Pivotal - First steps on a tool to integrate Git with Pivotal Tracker.
- CouchDB: The Definitive Guide - Free from O'Reilly.
- From Zero to Rails3 on Windows in 600 seconds - For gluttons for punishment.
- Rails Star Ratings Plugin Comparison - So you can do the whole stars display-and-click deal.
Double Shot #637
And somehow, I have survived another week.
- RDoc via OSX's Dictionary.app - Another piece of gem stuff from zenspider.
- Macistrano - OS X desktop interface for the Webistrano web extension for Capistrano.
- Using Factory_Girl with Cucumber - How to integrate the two by preloading the factories.
Double Shot #636
And no, running HTML 5 does not make a closed proprietary device magically open.
- Panopticlick - "How Unique - and Trackable - is Your Browser?". Test site from the EFF. Turning on NoScript helps significantly.
- The jQuery Cross-Domain Ajax Guide - A whole list of ways to work around cross-domain restrictions.
- Rails Security Review Checklist - Sara Allen pulls together some notes.
- Diff for gist.github - Another useful GreaseMonkey script.
- Postgresql 8.3 on Debian Lenny - Pretty easy to install and configure, actually.
Double Shot #635
It was a busy day, but not on the web-surfing front.
- rest-client - I've played with a bunch of applications designed to test RESTful web services; this is the one I'm currently using. It's a Java app, but it's got a decent OS X build.
Double Shot #634
Yesterday's catches in the link sea...
- VPS Performance Comparison - Slicehost, Linode, Prgmr, Rackspace, Amazon. Linode is the clear winner in this one.
- Linux performance basics - I really need to learn more of this stuff.
- Firefox 3.6 Tips and Tweak - Tab previews, change the open link behavior, a few more. jWizard - After looking at a few jQuery wizard frameworks we settled on this one. See also documentation and demos.
- Introducing the Dirty Associations Plugin - Interesting idea, not so sure about the name.
Double Shot #633
It was a busy weekend - apparently for other people as well as for me.
- couch.io - Managed hosting and support for CouchDB.
- UTC vs Ruby, ActiveRecord, Sinatra, Heroku and Postgres - Some notes on time zones in ruby web apps.
- SSL Certificate Check - From DigiCert, but works for any SSL site. A fast way to tell whether you have things configured and installed correctly.
- Rapid Application Deployment with Git - Nice new workflow from from Webbynode. I need to dust off my Webbynode account and play with this.
- pgtune - Automatic configuration tuning utility for PostgreSQL.
- Active Record Query Interface 3.0 - Shiny new finders for Rails 3.
- jQuery QueryString Plugin - Came in handy for hooking up Rails controller methods and stuff inside the jQuery.
- Getting Up to Speed with Rails 3 - Detailed look at moving over an existing Rails application.
- jQuery.sheet - Excel-ish spreadsheet implemented in jQuery.
- Git Branch Auto-Tracking - Useful tip from Mike Champion.
- MySQL Tip: How To Check, Repair & Optimize All Tables in All Databases - I never knew about mysqlcheck, but now that I do I'll likely be using it again.
- murder - Deployment via BitTorrent, courtesy of Twitter. Cute idea, but the number of sites that need this is vanishingly small.
Double Shot #632
12 is really too many billable hours for one day.
- PostageApp - SMTP mailing service that integrates directly via a Rails plugin.
- IBM DB2 Gem Version 2.0.0 Released - For Rails/ActiveRecord, now supporting paramaterized queries.
- Tuning Your PostgreSQL Server - A basic introduction.
- Table size, database size - Determining physical storage sizes with PostgreSQL.
- Setting PostgreSQL’s SHMMAX in Mac OS X 10.5 (Leopard) - How to temporarily bump up shared buffers without rebooting - works in Snow Leopard too. He's a bit confused about SHMALL, though, which is in pages rather than bytes on OS X.
- KyngChaos PostgreSQL - Precompiled OS X installers, including server, client, PostGIS, and pgRouting.
- Rails 3 Reading Material - Link list from Maxim Chernyak.
- What is Shared Memory - Straightforward explanation of OS X shared buffers with some alternative settings.
- Telephone - SIP/VOIP app for OS X.
- Twitter Unstupidify - Greasemonkey script from Peter Cooper, for those of us who dislike the new retweets.
Double Shot #631
Things are very nearly too busy, but there's still time for a few links.
- Rails Quick Tip: Readable Conditional Validation - Useful little bit of code from Michael Bleigh.
- MyGem.configure block - More syntax, this time for gem authors.
- fog - Gem to make it easier to work with cloud services (Amazon and RackSpace so far).
- A successful Git branching model - Nice writeup of use of git in a team situation.
- sinatra-pages - Sinatra extension for view rendering.
Double Shot #630
- jQuery Lint - Script to report incorrect usage of jQuery APIs.
- kumofs - A fresh distributed key-value store for Ruby.
- Code Blocks: Ruby's Swiss Army Knife - An excerpt from the Ruby Best Practices book.
- JavaScript grid editor: I want to be Excel - A big survey of grids available for jQuery and others.
- ThinkingSphinx exits, enters ActsAsSolrReloaded - The competition between search libraries for web applications will never end.
- How many Ruby Hackers does it take to change a lightbulb? - Lots.
Double Shot #629
Last night's fun: a failing hard drive. Fortunately I am obsessive about backups, so this is only nuisance, not disaster.
- Discovering Rails 3 Generators - Jose Valim rounds up some of the info that came out during last weekend's BugMash.
- Getting MacRuby's Compiler to Work - Came in handy when I went a bit install-happy with rvm yesterday.
Notes on Using Jammit with Rails
I spent some time this weekend wiring up a new Rails application to use Jammit for asset caching. So far I'm quite happy with the results; it offers a sophisticated set of asset caching strategies (indeed, we're not even making use of them all yet) and does its compression on the client side during the deployment process. For those who aren't complete experts in all things sysadmin, a few notes on making this work:
1) If you're using the rails_xss plugin (or Rails 3), you'll need to make sure it doesn't try to escape the HTML generated by the Jammit helpers. You do this by wrapping all calls to those helpers in the
raw
helper:
<%= raw include_stylesheets(:common, :media => 'all') %>
<%= raw include_javascripts(:common) %>
2) For deployment, I'm using this chunk of code in my Capistrano recipe (hat-tip to kpumuk whose gist I started from):
namespace :deploy do
desc 'Bundle and minify the JS and CSS files'
task :precache_assets, :roles => :app do
root_path = File.expand_path(File.dirname(__FILE__) + '/..')
assets_path = "#{root_path}/public/assets"
gem_path = ENV['GEM_PATH']
run_locally "#{gem_path}/bin/jammit"
top.upload assets_path, "#{current_release}/public", :via => :scp, :recursive => true
end
end
after 'deploy:symlink', 'deploy:precache_assets'
This will build the assets locally and then upload them. You'll want to add public/assets
to your .gitignore
file.
3) You should have mod_expires loaded in Apache to handle far-future expiration dates for asset access. If this is missing, you'll get an error when you try to load a configuration file that includes the ExpiresDefault
directive. On Debian, this is as simple as moving expires.load
from /etc/apache2/mods-available
to /etc/apache2/mods-enabled
(which is what a2enmod
does). If you're using some other flavor of OS, try this article for instructions. OS X includes mod_expires by default.
4) The Passenger documentation says flat out that MultiViews is incompatible with Passenger. So far, I haven't found any problem enabling MultiViews just on the assets directory, though, probably because it doesn't go through Passenger.
5) Here's a vhosts entry that sets things up for a Jammit-enabled application:
<VirtualHost *:80>
ServerName myapp.com
RailsEnv production
DocumentRoot /u/apps/myapp/public
<Directory "/u/apps/myapp/public">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Directory /u/apps/myapp/public/assets>
Options MultiViews
ExpiresDefault "access plus 1 year"
</Directory>
</VirtualHost>
Double Shot #628
The inital round of the Developer Wellwishes campaign is drawing to an end on Thursday, when we'll be combining donations with a few other campaigns to make a contribution to charity:water. If you've done your share for earthquake relief and still want to help more people out, do drop by.
- Distributed Ruby with the MagLev VM - A nice look at what's going on with this alternate Ruby, which to my mind is more significant than Rubinius or MacRuby. Being able to store distributed objects with no ORM is likely to be a killer feature.
- Deadweight and Helium - CSS coverage tools that can report which selectors are unused in your application.
- popthis - Turn a folder of email files into a POP3 server for testing purposes.
- git-googles - Git utilities for branch management and code review.
- The least you should know about S3 with Rails - This stuff is all out there, but here's a one page overview.
- Yaml Cookbook - Turns out Ruby's YAML support is a good deal more flexible than I had realized.
- Ruby Fibonacci Shootout - MacRuby is turning out some impressive performance numbers. Too bad it can't run anything I care about yet.
- has_price - DSL for organizing things like taxes, discounts, and base prices. Wish I'd had this a year ago.
- cacheable - Gem that adds cacheify, which is similar to memoize but uses memcached.
Double Shot #627
Some odds and ends before I fling myself at a pile of tax paperwork.
- paper_trail - Looks like a very thorough auditing/versioning plugin for ActiveRecord.
- Importing Legacy Data in Rails - An approach to wiring things up so you can grab data from a still-running legacy system as needed.
- Cappuccino On Rails - Rich front end, Rails back end, have fun.
- jQuery 1.4 API Cheat Sheet - Online (with links to the official API site), PDF, or PNG.
- jQuery 1.4 Released - The official announcement and what's-new list.
- Puppet Documentation - New site for help with this server management framework.
- whitespace-tmbundle - Strip trailing spaces and tabs when saving a file from TextMate.
Double Shot #626
Long days make for few links.
- Validatious 2.0 - Cross-browser unobtrusive JavaScript forms validation.
- Random Repo - A new way to waste time on GitHub.
- On-the-fly image handling with Dragonfly - Generate thumbnails and so on only when you need them.
Double Shot #625
Next couple of weeks are looking super busy. Better than the alternative by far.
- I Have No Talent - Words well worth reading from John Nunemaker. There are ample ways to succeed in this business without being some sort of uber-coding genius. Trust me, I know.
- I Am Not a Master but a Solutionist - And Rob Bazinet chimes in to promote getting the job done.
- Sandstone - One more approach to CMS in Rails. Looks like there are several active branches with no one merging them though.
- Vote for Barbie's Next Career - "Computer engineer" is in the running.
- TotalFinder - Using SIMBL to make Finder better in Snow Leopard.
- TipTip JjQuery Plugin - A simple custom tooltip plugin.
- Bombax - Objective-C and Cocoa web development framework. No thanks.
- workflow - Another state machine alternative for Ruby.
subscribe via RSS