Mike Grafton's blog



Mike GraftonMike Grafton
Standup 3/13/2009
edit Posted by Mike Grafton on Friday March 13, 2009 at 05:16PM

Help

What is better for optimizing the load time of pages on the iPhone: minifying or packing your javascript?

Mike GraftonMike Grafton
Standup 3/12/2009
edit Posted by Mike Grafton on Thursday March 12, 2009 at 04:48PM

Interesting

  • Selenium removes the If-Modified-Since header. This gets in your way if you are testing ETags.

  • Speaking of ETags - they are awesome. See Ryan Daigle's article for code.

Help

Just how slow is Mongrel when serving static images?

The answer is - pretty slow. The reason for the question was that Google's crawler tends to keep a single connection open and fire lots and lots of http requests over a period of several hours. With a standard Nginx/Mongrel setup, this would tie up a mongrel for this entire period.

A proposed solution to this problem is to use HAProxy between Nginx and Mongrel.

Mike GraftonMike Grafton
Standup 03/11/2009
edit Posted by Mike Grafton on Wednesday March 11, 2009 at 04:17PM

Interesting

  • With RMagick 2.9.1 and ImageMagick 6.4.6.9 (or so), you get a 1x1 pixel image if you crop and then resize an image to be bigger:
image.crop!().resize!()

Mike GraftonMike Grafton
Standup 03/09/2009
edit Posted by Mike Grafton on Monday March 09, 2009 at 05:24PM

Help

How do you make a Mac not sleep?

Use the Energy Saver section of the System Preferences.

Interesting

  • RubyMine 749 is out. Many of the existing bugs have been fixed, but a few new ones have been found. Notably, running specs with a "#" character in the describe string has problems.

  • The USPS has a nifty web service for addresses. The zip code lookup (which gives you zip+4) and the address standardization services were found to be useful.