Link

JS loading spinners. No images or external CSS required. Small footprint.

Text

Sinatra redirect www to non-www

Here’s a quick and dirty way to redirect requests for www.domain.com to domain.com in a Sinatra app:

before do

redirect request.url.sub(/www\./, ''), 301 if request.host =~ /^www/

end

Link

Simple use of Google Apps account to provide access credentials to a Rails 3 app with the OmniAuth gem.

Text

Amazon S3 content type problems with Transmit

When I recently used Transmit (4.1.7) to upload Rails assets to Amazon S3 I ran into an issue where the CSS files were being loaded, but the styles weren’t being applied. Attempting to access the CSS directly would download the file instead of displaying it in the browser.

A quick check on Google led me to the answer – S3 was returning the wrong content-type headers.

Transmit actually has a feature for this, go to Preferences > Cloud and you can customize headers by file type. I added Extension: css, Name: content-type, Value: text/css and re-uploaded my CSS files (then set the permissions to Read: World) and the styles are now being parsed correctly.

Link

Very nice Tumble theme, used on garrettdimon.com

Link

Simple, fast, lightweight template parsing to replace erb (and haml).

Link

Complete history of NHL transactions.

Link

Serve is a small Rack-based web server and rapid prototyping framework for Web applications (specifically Rails apps).

Link

strftime reference and sandbox.

Link

Take your app down automatically with a friendly maintenance message before deploying.