In The Kobayashi Maru, Kirk, Sulu, Scotty, and Chekov are trapped in a crippled shuttlecraft and decide to pass the time by telling stories of their runs through The Kobayashi Maru test. Kirk explains how he managed to "win" by hacking into the computer the night before and tweaking the code slightly...
Kirk:"This is Captain James T. Kirk, of the USS Potemkin. We are on a rescue mission in search of a civilian freighter registered with the United Federation of Planets. We mean no harm, but we will defend ourselves if necessary."
17822 was a very interesting year on Ferenginar. In that year alone, over twenty thousand Grand Nagi held office; the Ferengi Financial Exchange crashed 3152 times, while setting 12322 record highs; there were 41098 civil wars; an unknown number of Ferengi-incited interstellar wars (estimates are in the millions); and the Ferengi sun went nova at least once a week. In other words, 17822 was the year Ferenginar discovered time travel.
The TNG novel Q-in-Law, in which Q and Lwaxana Troi meet. Just the tagline should give you some idea: "Two of the most powerful forces in the galaxy are about to collide..."