Prosecutor Linda Baker told the court that following a complaint to police, other offensive tweets by Robert Riley came to light.
Among them were messages about the missing Malaysian plane, the Korean ferry disaster and champion tennis player Serena Williams.
More top news
A night of two halves - cold under clear skies in the south, with cloud and mist around the hills in the north!
The partner of a man critically injured in a crash in Cardiff has appealed for witnesses to come forward.
There are calls for the Welsh Government to change the law to force councils to collect rubbish at least once a fortnight.