A civil servant who refused to pay a taxi fare and began banging aggressively on a garda station door had turned to alcohol after a relationship ended "abruptly", a court has heard.
Neil Lambert (33) had little recollection of the incident, which came "out of the blue" for him.
Judge Michael Walsh said he would strike out the case, leaving Lambert without a criminal record, if he made a €300 charity donation.
Father-of-one Lambert, of Blarney Park, Crumlin, admitted non-payment of a taxi fare, threatening, abusive and insulting behaviour and failing to comply with garda directions.
An officer told Dublin District Court the accused went to Sundrive Road Garda Station in the early hours of last February 22 and aggressively banged on the public office door.
When gardai told him to leave, he became verbally abusive and refused before being arrested.
He was "extremely aggressive to the officers", the court was told.
A garda said Lambert had refused to pay a taxi fare.
He worked in the civil service and had no previous convictions of any kind.
He had been in a relationship for six years and, when it ended abruptly, he turned to alcohol, his solicitor Brian Doherty said.
In relation to the night of the offence, this was "something that came out of the blue" and Lambert had little recollection of what happened, Mr Doherty said.
Lambert was genuinely remorseful and asked the judge to consider leaving him without convictions.
Adjourning the case, Judge Walsh said he would do this if the accused paid €300 to Ronald McDonald House.