From the season 8 finale of Stargate SG-1, entitled 'Moebius'.
The alternate-timeline McKay (who has never met our Carter, and thus has never met anyone smarter than him) shows that his ego is just as big whatever the events of the timeline. He even gives Carter a little pat on the bum!