There are two kinds of Riya - Showing off-Ostentation ie pure ostentation and adulterated ostention. In pure ostentation "Riya" a man does a good deed only for worldly benefit. In Adulterated ostentation, a man does a good deed with the intention of reaping the benefits of the world as well as of the Hereafter.
Al-GhazaliNeglect not your time, nor use it haphazardly; on the contrary you should bring yourself to account. Structure your litanies and other practices during each day and night. This is how to bring about the spiritual blessing (baraka) in each period. If each of your breaths is a priceless jewel, Be not like the deceived fools who are joyous because each day their wealth increases while their life grows ever shorter.
Al-GhazaliNo one who possesses snow would find any hardship in exchanging it for jewels and pearls. This world is like snow exposed to sun, which continues to melt until it disappears altogether, while the next life is like a precious stone that never passes away.
Al-GhazaliAre you ready to cut off your head and place your foot on it? If so, come; Love awaits you! Love is not grown in a garden, nor sold in the marketplace; whether you are a king or a servant, the price is your head, and nothing less. Yes, the cost of the elixir of love is your head! Do you hesitate? 0 miser, It is cheap at that price!
Al-Ghazali