A repeat motoring offender took a car on the road without insurance because he could not afford the €6,000 he was quoted, a court heard.
Ian O'Keeffe (29) was spared a prison sentence but was warned by a judge that he "knows where he is going" if he drives again.
Judge David McHugh banned him from driving for eight years and adjourned his case for a community service suitability report.
Father-of-two O'Keeffe, of The Glebe, Newcastle, Co Dublin, pleaded guilty to uninsured driving.
Blanchardstown District Court heard he was stopped driving on the M50, northbound on July 4, 2016.
Then, on July 16, officers were on duty in the public office at Ronanstown Garda Station when O'Keeffe came in shouting and demanding to speak to one of them.
He verbally abused an officer, shouting profanities at him.
He was abusive and aggressive and was arrested when he refused to desist. O'Keeffe admitted breach of the peace.
The court heard he had a number of previous motoring convictions.
Judge McHugh noted that it was an "appalling record".
O'Keeffe was an electrician and was the sole provider for his family, his lawyer said.
He had now made other transport arrangements and accepted he would not be driving for a "very, very long period of time".
Judge McHugh said this was "the least of his difficulties" and asked the lawyer to explain the mentality behind an uninsured driver who was the sole provider for his family getting behind the wheel of a car.
O'Keeffe was getting insurance quotations of more than €6,000, the lawyer said. He could not afford this, had to drive for work and took "the foolish decision to do so".
The judge said if he was getting €6,000 quotations, it was "down to his own wrongdoing previously, so he is the author of his own difficulties".
The judge recommended 220 hours of community service instead of a five-month prison sentence if O'Keeffe is found suitable and fined him €100.