Du Mu 杜牧, courtesy name Muzhi 牧之 (803 – 852) was probably both lucky and unlucky to be born when he was. On the plus side, he certainly had no shortage of idols and previous poets to learn from – indeed, among the poets of the Tang he is known as ‘lesser Du’ or ‘minor Du’, to differentiate him from the ‘greater Du’, Du Fu (712 – 770). (They are not closely related, though both of them are from the same Du clan – it was a pretty powerful clan during that era.)
As for the negatives, Du Mu grew up and entered government at a time when the Tang government was pretty knackered, between civil wars, half the country being quasi-independent, and eunuchs running the show in the palace while the long-running political episode called the Niu-Li Factional struggle – think modern two-party politics, but with losing parties executed or sent to Siberia – continued its long, long run. Still, having passed his Imperial Examinations, Du Mu got a lucky break, having been assigned to Xuancheng 宣城 (in modern day Anhui Province) as a member of the local administration. It’s hard to overstate how lucky a break this is for a poet; to this day, the city of Xuancheng gives its name to the lovely, strong and absorbent paper, known as Xuanzhi 宣紙 (lit. ‘Xuanzhou paper’) which is used in Chinese ink-wash paintings.
Naturally, he took to it like a poet in those days (in any days, really) took to alcohol, pretty girls and the ‘scene’; and this is the poem he wrote when eventually he had to be transferred to the capital.
Unbridled in Xuancheng’s environs, I have passed ten autumns;
And not one day has passed me without poetry and wine.
I’ve started awake beside the stream that flows round Lord Xie’s city ;
The willows before Su Xiao’s gate  have oft caressed my head.
In a thousand li of clouds and peaks, is there any pleasant place?
How few can live so free of care, before their lives’ ends face.
Oh, to hang my headdress  and govern just my idleness,
And return here, to mock time spent on official business.
 Lord Xie’s city: Xie Tiao 謝脁 (464 – 499) was a famous poet of the Southern Qi Dynasty (479 – 502), who served as the Governor of Xuancheng in 495. Because of that he was known as ‘Xie of Xuancheng’ – an association cleverly reversed in this poem.
Also, he started awake because he got smashed. You know, like every other poet of his age.
 Su Xiao’s gate: Su Xiaoxiao was a famous entertainer who had absolutely nothing to do with Xuancheng; she was, however, apparently so beautiful and lovely and good at singing that her name became a general term for all singing girls. (It’s maybe for the best these things don’t happen these days. Oh, what lovely Gagas…) Anyway, she was famous for planting willows in front of her probably frequented doors, and willows or no, Du Mu certainly frequented many songstresses’ doors.
 Since the headdress is a sign of office, hanging it up naturally means resigning one’s commission.