A rickshaw driver caught selling cocaine and heroin had been "moonlighting as a drug dealer" to pay the rent.
Gardaí caught Marlon De Souza (25) in a street deal and found him with more than €500 worth of drugs and €430 in cash.
Judge Bryan Smyth adjourned the case against him when he appeared in Dublin District Court.
De Souza, with an address ar Lisburn Court, North King Street pleaded guilty to possession of drugs for sale or supply.
The court heard gardaí were on a plainclothes operation at Suffolk Street at 1.14am on February 15 when they saw the accused acting suspiciously.
When they approached, they saw De Souza with a bag of white powder, suspected to be cocaine, in his hand.
He handed this bag to another man and gardaí identified themselves, showing their badges. De Souza attempted to leave the area, but was caught after a short foot chase.
Two bags of suspected cocaine were retrieved from the ground beside the accused, and a further bag believed to contain heroin was recovered in the vicinity.
Cash totalling €430 was concealed on De Souza's person, the court heard.
This was believed to be the proceeds of selling drugs and was seized. The heroin was worth €415 and the cocaine had a street value of €150.
Defence solicitor Peter Connolly said the accused was from Brazil, came here two years ago and ended up not being able to pay his rent.
He was "down and out and did this for a short period", Mr Connolly said.
"Effectively for a period of time, people who were driving rickshaws were asked to moonlight as drugs dealers and there is where he found himself."
Mr Connolly said there was another matter before the courts to be dealt with and asked the judge to adjourn this case to that date.
The accused was prepared to carry out community service instead of a prison sentence, although the court heard there may be "difficulties with that".
Judge Smyth adjourned the case to October 21.