Oneliners: making binary flashcards

I'm cramming for my CCNA test so I need to know things like binary exponents and subnet masks down cold. So I'm using Anki to drill and memorize. Here's a quick one liner to generate the powers of 2 in a shuffled semicolon-separated list backwards and forwards: ::(1..25).map{|n| ["#{2**n}=2^?; #{n}\n", "2^#{n}=?; #{2**n}\n"]}.flatten.collect.sort_by { rand }.each{|n| print n}