In a wok or large skillet, heat the oils over medium. When hot, add the onions, tofu, garlic, and chili flakes. Cook until the onions are soft.
Add the shrimp (or chicken or pork). Stir fry until fully cooked.
Add the egg and stir fry until the egg is cooked.
Add the sugar, fish sauce, oyster sauce, noodles, and 1 ½ cups of water. Cover. Open and stir every minute or so. Try to press the noodles into the water in order for them to soften and cook.
Once the noodles are soft add in the carrot and bean sprouts. Stir to combine.
Serve with fresh cut limes for squeezing, chopped peanuts, extra chili flakes for those who want more spice, and sugar for those who like it sweeter.