I learned to do this trick with the following book: http://www.amazon.com/Unleash-Your-Hidden-Poker-Memory/dp/17...
It takes me more than a minute though, because I don't practice often enough. The technique is based on leveraging the visualization capabilities of your brain.