Finely chop the onion and green onion.
Beat the eggs in a bowl and season with salt and pepper.
Add oil to a pan and stir-fry the onion and green onion.
Pour in the egg mixture and stir quickly while cooking.
Add the rice and stir-fry together, adjusting the seasoning to taste.
Place the stir-fried eggs and rice in a bowl.