The blog has moved to http://jessehouse.com/ ... Many google searches point here so I am leaving it operational, but there will be no new posts.

Tuesday, April 20, 2010

Uptime and performance monitoring made easy - pingdom.com

This is a nice service - http://pingdom.com/

Get an email or SMS alert if your site is not responding. They ping your site from multiple servers in both North America and Europe.

They offer one free account where you can ping a single url or get one of their payed monthly plans if you have additional sites to monitor.

Wednesday, April 14, 2010

GIMP install on MAC

Don't bother installing GIMP using MacPorts; I started this process and it ran for over an hour before I stopped the install. It has alot of dependencies and MacPorts was busy installing all of them.

Just go to http://gimp.lisanet.de/Website/Download.html and download the package for your OS version

around 75mb download but installed in minutes :)

Tuesday, March 23, 2010

sorting rails view with will_paginate plugin

This solution for sorting data on rails index actions does NOT use ajax. Sometimes sorting with ajax is nice but often it is not actually as user friendly; breaking the browser back button, etc...

Disclaimer 1: this code is probably using all kinds of ruby anti-patterns :) - but it is a very simple implementation and so I just went with it...

Disclaimer 2: the title of the post might be a little miss leading as you can use this with or without the will_paginate plugin. In my case I am using it with the will_paginate plugin - and I highly recommend it!

put this file in your rails lib directory /lib/sort_index.rb

in your controller code, set up the SortIndex::Config (you can have more than one if you have multiple actions that need to support sorting

then in your view code render your table headers using the sort object

Does not support the following:
  • additional attributes on the anchor tags
  • additional attributes on the table header tags
  • additional query string parameters - might add this later, would be nice for search results

Monday, March 15, 2010

Digg style css for will_paginate plugin

Just started using the will_paginate plugin for my rails application. I wanted a Flickr or Digg style applied to the paging controls, did not find anything that came 'out 0f the box'. After a few google searches I came across this link which had an example - apparently from an older version of the README file.

here is that css for reference

.

Thursday, March 11, 2010

exclude .svn results with egrep recursive search

The exclude-dir option works nicely, I was previously was using --exclude and it would include some sub-dir .svn files
egrep --exclude-dir=\.svn -r -n {search-criteria} {directory}
i.e. find all TODO comments in the current directory and all sub directories
egrep --exclude-dir=\.svn -r -n TODO .

Found this in the comments on this post - http://antoniolorusso.com/2008/05/12/grep-excluding-svn-dirs/

.

Friday, March 5, 2010

cut back on the blog reading

I had 200+ subscriptions in my rss reader - way too many
I just cut it back to a short list. No doubt the list will start to grow again...