Chill the cooked rice so the grains are dry and separate.
Beat the eggs in a small bowl and season with a pinch of salt.
Heat a large skillet or wok over medium-high. Swirl in 1 tsp oil.
Scramble the eggs until just set. Transfer to a plate.
Add remaining oil. Sauté garlic and ginger until fragrant, about 30 seconds.
Stir in ham and cook until lightly browned on the edges, 3 to 4 minutes.
Add peas, carrots, and pineapple. Stir-fry until hot, about 2 minutes.
Add rice. Toss well, pressing to sear slightly and break up clumps.
Pour in soy sauce, rice vinegar, brown sugar, and sesame oil. Stir to coat evenly.
Fold in eggs and green onions. Season with pepper flakes, salt, and pepper.
Serve hot, sprinkled with sesame seeds and extra green onions if desired.