If you don’t have any day-old steamed rice in your fridge, steam 2 cups of rice in a rice cooker; when done, spread the rice out loosely on a tray to cool and set aside.
Chop garlic with salt by sprinkling a pinch of salt on the chopping board then finely chopping the garlic cloves on the salt.
In a wok over medium heat, heat the oil and fry the garlic until fragrant and just starting to change colour, taking care not to let it brown or burn, then add the onion and curry powder, combine well and continue to fry until aromatic.
Crack one egg into the wok and scramble for a minute, add the sugar, light soy sauce, and diced pineapple, and combine well.
Add the rice, turn down the heat, and stir-fry continually, mixing and tossing, to ensure the rice is covered with the garlic, onion and curry sauce, the pineapple is evenly distributed, and everything is hot.
Turn off the heat, stir through one tablespoon of the finely sliced scallions/spring onions, taste, and if needed, season with salt and white pepper, and serve immediately. Garnish with the remaining scallions/spring onions and a sprinkle of chilli flakes.