A Dad was arrested at a family party to celebrate his son's release from jail.
Martin O'Brien (46) flew into a rage because gardai were called out over a noise complaint.
He screamed drunken abuse at the officers and threw a bottle at their car when they arrived at his house in south Dublin.
O'Brien admitted charges of public intoxication, breach of the peace and producing a glass bottle as a weapon at his home at Coolevin, Ballybrack, on October 1.
Public order charges against his wife Margaret (46) were dropped by the State after he took full responsibility for the incident.
Judge Anne Ryan said she would leave O'Brien without convictions if he made a €100 donation to charity.
Dun Laoghaire District Court was told that gardai were called to the scene at 2.30am.
Officers heard shouting and the breaking of glass coming from the defendant's house.
The accused was intoxicated at the scene and gardai saw that a low wall in the garden had been broken down, with bricks thrown around the place.
The defendant was seen throwing the bottle at an unmarked garda car.
He was arrested and brought to Dun Laoghaire Garda Station.
Solicitor Ronnie Lynam explained that O'Brien's son Martin had been serving a lengthy prison sentence and had just been released.
A family celebration was taking place at the house.
"Unfortunately, what went hand in hand with that was excessive drinking, which went on into the early hours of the morning and it got very loud," Mr Lynam said.
"The family were somewhat upset by the arrival of the gardai and felt it was a case of 'here we go again'," said Mr Lynam.
"While it doesn't excuse what happened, it goes some way to explaining it.
"Mr O'Brien very much apologises in sobriety for the way in which he dealt with matters on the night."
The court also heard that a child who was close to the family was in Temple Street Hospital with a serious genetic disorder.
"Sometimes their troubles spill over and this is one of those occasions where it did," said Mr Lynam.
The defendant accepted that his neighbours were trying to have a peaceful night.
Judge Ryan said the accused's behaviour had been out of line.
"If you do feel that life is getting on top of you for whatever reason, you should seek some assistance rather than letting it overflow," she told him.
She adjourned the case for payment of the charity donation and said she would apply the Probation Act.