How can I get rid of gnats and other flies all over my house?
There are plenty of recommendations out there on the web, but I can't say how well they work.  I think the lifespan of a gnat is something along the lines of 15 days, so you basically just have to remove their food source, and they'll be gone in 2 weeks.

Clean dishes quickly, keep everything clean, get rid of potted plants (they feed on the manure found in many types of soil that you might get for potted plants) or cover the top layer of soil with an inch of sand to prevent them from getting to the manure, look for any dead animal bodies (rats, lizards, birds, etc.)

I've also seen ideas for traps, which supposedly work pretty well, but just because you catch some, that doesn't necessarily mean that you'll get rid of their breeding grounds.  The basic idea is that you take a cup and put 1" of vinegar and one drop of dish soap in it, then cover it with something that resembles a funnel (curl up a piece of paper into a cone shape and cut the tip off.)  They'll be able to fly in because the funnel will guide them downward, but they won't be able to get out so long as you seal between the lip of the glass and the funnel (maybe fold it back down on the outside of the glass and secure it with rubber bands.  Like this: