Al Hassan Al Basri (was a very famous and renowned scholar\Imam in the 700s) was once asked about the secret to his reluctance towards this materialistic world.
He answered (the meaning of):
I learned that my responsibilities are non but my own, so I occupied my time taking care of them.
I learned that what is destined for me, will never go to anyone else.
I learned that God is aware of everything, so I never allowed myself to commit a sin.
I learned that death awaits me, so I have long prepared myself to meet my Lord.