To kill the fleas in your carpet and other things, Diamateous Earth, very similar to the stuff used in pool filters. It dries out their bodies and eggs. Get the organic kind, doesn't include Silicon dioxide which is hard on the lungs.
To keep fleas off your dog once they have been dipped or other treatment, cider vinegar in the water, crushed matchheads and garlic in their food.