Heat a wok or skillet very hot, until a drop of water dropped on it immediately sizzles into steam. Add the oil, stir briefly, then add the egg and scramble until done. Break up the egg with a spatula into 1-inch pieces. Add the bean sprouts and onions, stir a couple of times, then add the chicken stock. Stir-fry one minute.
Add the chicken, rice, pepper, soy sauce, and sugar. Break up the lumps of rice and stir-fry 2 minutes more.
This is typically a dish made from leftovers, so you can generally add other things that may be lying around. I usually add a quarter-cup of frozen peas, and sometimes chopped carrots. I generally like the rice fairly dark, so I usually also add 1 tablespoon of regular soy sauce (in addition to the dark soy sauce) and sometimes a dash of hoisin sauce, too.
You can substitute 1/4 cup of Chinese roast pork or 1/2 cup diced cooked shrimp for the chicken.