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

Sunday, August 23, 2009

scrolling screen shot on ubuntu

I've been using ubuntu for the last 6 months, really like it! But also really missing SnagIt :(

so far I have come across these screen shot tools

  • built in 'save screen' program - read this post for info about that and others
  • Shutter

but none that I came across would do scrolling screen shots; currently I only needed scrolling screen shots of web pages and I just came across a great tool for that - a firefox add-on called Abduction, it is really easy to use.

For full page screen shots (including all scrollable regions) or for cropped sections of a page. Just right click on the page and select 'Save Page as Image', if you are over an 'element' it will auto select that as the cropped area, you can then adjust the crop and save, if you want the entire page the easiest seems to be right clicking where there are no elements below the mouse and then adjust the fully selected page as needed

The saved png can then be opened in Shutter for applying arrows, boxes, etc...

Friday, August 21, 2009

Ajax error handling with ruby on rails and jquery

This sample is just a slight modification of this post 'Handling AJAX errors and displaying friendly error messages to users'. Basically I wanted to maintain the existing rails error handling for non-ajax pages and then have good handling for errors in both development and production mode; i.e. get errors in the browser when in development mode and show a nice message when in production mode.

Modify /app/controllers/application.rb; add the rescue_from macro and the handler_exception method

Then add a global javascript method for presenting the errors; most likely in application.js

Then a sample usage, jquery making an ajax post to a rails controller action

in development mode the error message is returned in an easier to read view in the firebug console and an alert message is presented that has a truncated version of the error

dev mode

in production mode just a friendly error message.

production mode


Tuesday, August 4, 2009

Get list of MSSQL jobs that are currently running

The following sql statement will return information about the currently executing MSSQL jobs.
Run it against the msdb database