Some random and useful codes.