In a mixing bowl, combine cornmeal, flour, baking powder, salt, sugar, cayenne pepper, and garlic powder. Add the milk and beaten egg, followed by the red and green onions. Stir until the batter is just combined, then allow it to rest for 10 to 15 minutes.