Let's start with the foods & drinks that are safe at any temperature. Soft drinks, unopened juices & condiments like ketchup and mustard will not be affected by an outage.
But when you're dealing with refrigerated food, a few hours with the power out won't make a big difference. However, the key is to keep the doors closed! Foods like salad dressings, mayonnaise, butter & hard cheeses probably won't spoil, but the quality may suffer.
So, what foods should you really be concerned about? Any meats, fish, dairy products, egg products and soft cheeses are prone to spoiling. Also, keep an eye on any pasta salads, cooked beans & rice, cooked potatoes & custards. The magic number for these foods is 40 degrees, so if your fridge reaches above this temperature, you have to throw out all these foods for safety.
And when it comes to your freezer, don't open the door unless absolutely necessary. A full freezer will stay at freezing temperature for about two days. A half freezer? About one day. These estimates don't take into account any door openings, so if you do open the door, the temperatures will rise faster.
If you're worried about freezer food getting too warm, the food should stay safe as long as it has ice crystals on the outside or is still cold. You can re-freeze this food, but the quality will probably suffer.