I used to have a big problem with rockets flipping over. At the time I used the "Matt Lowne" ascent profile. Essentially, straight up until 10km, then tip over to 45degrees and burn until desired apoapsis is achieved. I have since learned a more realistic gravity turn. It's much less likely to flip a rocket, and it saves a lot of fuel to orbit.
Basically: launch straight up until speed is about 100m/s, then tip over about 5 degrees. once there watch your time to apoapsis, and when it reaches 32-45 seconds, lock SAS to prograde and throttle down on the engines to maintain time to apoapsis in that range. The rocket will then slowly tip over all by itself as you ascent, and because you're always facing prograde your rocket doesn't flip, and you minimize air resistance. If you want to tip over faster, throttle down, if you want to ascend steeper, throttle up.