Snow had a neat trick using the ruler tool in Photoshop. You draw the ruler out on what should be a straight line, then go to rotate - arbitrary and it will pre-populate the rotate amount by what is required to make the ruler straight.
I also have used the Guides in Photoshop to setup 2 vertical and 2 horizontal guides along the edges then rotated little by little until it was the closest to square I could get.
I confess I havn't always done this though, sometimes if it looks straight enough I just leave it.
I am also curious what other tricks are out there.
Antony30bc