Ecclesiastes 12:9-14 (ESV) Besides being wise, the Preacher also taught the people knowledge, weighing and studying and arranging many proverbs with great care.  The Preacher sought to find words of delight, and uprightly he wrote words of truth.  The words of the wise are like goads, and like nails firmly fixed are the collected sayings; they are given by one Shepherd.  My son, beware of anything beyond these. Of making many books there is no end, and much study is a weariness of the flesh.  The end of the matter; all has been heard. Fear God and keep his commandments, for this is the whole duty of man.  For God will bring every deed into judgment, with every secret thing, whether good or evil.
Ecclesiastes 11:7-12:8 (ESV) Light is sweet, and it is pleasant for the eyes to see the sun.  So if a person lives many years, let him rejoice in them all; but let him remember that the days of darkness will be many. All that comes is vanity.  Rejoice, O young man, in your youth, and let your heart cheer you in the days of your youth. Walk in the ways of your heart and the sight of your eyes. But know that for all these things God will bring you into judgment.  Remove vexation from your heart, and put away pain from your body, for youth and the dawn of life are vanity. [12:1] Remember also your Creator in the days of your youth, before the evil days come and the years draw near of which you will say, “I have no pleasure in them”;  before the sun and the light and the moon and the stars are darkened and the clouds return after the rain,  in the day when the keepers of the house tremble, and the strong men are bent, and the grinders cease because they are few, and those who look through the windows are dimmed,  and the doors on the street are shut—when the sound of the grinding is low, and one rises up at the sound of a bird, and all the daughters of song are brought low—  they are afraid also of what is high, and terrors are in the way; the almond tree blossoms, the grasshopper drags itself along, and desire fails, because man is going to his eternal home, and the mourners go about the streets—  before the silver cord is snapped, or the golden bowl is broken, or the pitcher is shattered at the fountain, or the wheel broken at the cistern,  and the dust returns to the earth as it was, and the spirit returns to God who gave it.  Vanity of vanities, says the Preacher; all is vanity.
Ecclesiastes 11:1-6 (ESV) Cast your bread upon the waters, for you will find it after many days.  Give a portion to seven, or even to eight, for you know not what disaster may happen on earth.  If the clouds are full of rain, they empty themselves on the earth, and if a tree falls to the south or to the north, in the place where the tree falls, there it will lie.  He who observes the wind will not sow, and he who regards the clouds will not reap.  As you do not know the way the spirit comes to the bones in the womb of a woman with child, so you do not know the work of God who makes everything.  In the morning sow your seed, and at evening withhold not your hand, for you do not know which will prosper, this or that, or whether both alike will be good.
Ecclesiastes 9:13-10:20 (ESV) I have also seen this example of wisdom under the sun, and it seemed great to me.  There was a little city with few men in it, and a great king came against it and besieged it, building great siegeworks against it.  But there was found in it a poor, wise man, and he by his wisdom delivered the city. Yet no one remembered that poor man.  But I say that wisdom is better than might, though the poor man's wisdom is despised and his words are not heard.  The words of the wise heard in quiet are better than the shouting of a ruler among fools.  Wisdom is better than weapons of war, but one sinner destroys much good. [10:1] Dead flies make the perfumer's ointment give off a stench; so a little folly outweighs wisdom and honor.  A wise man's heart inclines him to the right, but a fool's heart to the left.  Even when the fool walks on the road, he lacks sense, and he says to everyone that he is a fool.  If the anger of the ruler rises against you, do not leave your place, for calmness will lay great offenses to rest.  There is an evil that I have seen under the sun, as it were an error proceeding from the ruler:  folly is set in many high places, and the rich sit in a low place.  I have seen slaves on horses, and princes walking on the ground like slaves.  He who digs a pit will fall into it, and a serpent will bite him who breaks through a wall.  He who quarries stones is hurt by them, and he who splits logs is endangered by them.  If the iron is blunt, and one does not sharpen the edge, he must use more strength, but wisdom helps one to succeed.  If the serpent bites before it is charmed, there is no advantage to the charmer.  The words of a wise man's mouth win him favor, but the lips of a fool consume him.  The beginning of the words of his mouth is foolishness, and the end of his talk is evil madness.  A fool multiplies words, though no man knows what is to be, and who can tell him what will be after him?  The toil of a fool wearies him, for he does not know the way to the city.  Woe to you, O land, when your king is a child, and your princes feast in the morning!  Happy are you, O land, when your king is the son of the nobility, and your princes feast at the proper time, for strength, and not for drunkenness!  Through sloth the roof sinks in, and through indolence the house leaks.  Bread is made for laughter, and wine gladdens life, and money answers everything.  Even in your thoughts, do not curse the king, nor in your bedroom curse the rich, for a bird of the air will carry your voice, or some winged creature tell the matter.
Ecclesiastes 9:1-12 (ESV) But all this I laid to heart, examining it all, how the righteous and the wise and their deeds are in the hand of God. Whether it is love or hate, man does not know; both are before him.  It is the same for all, since the same event happens to the righteous and the wicked, to the good and the evil, to the clean and the unclean, to him who sacrifices and him who does not sacrifice. As the good one is, so is the sinner, and he who swears is as he who shuns an oath.  This is an evil in all that is done under the sun, that the same event happens to all. Also, the hearts of the children of man are full of evil, and madness is in their hearts while they live, and after that they go to the dead.  But he who is joined with all the living has hope, for a living dog is better than a dead lion.  For the living know that they will die, but the dead know nothing, and they have no more reward, for the memory of them is forgotten.  Their love and their hate and their envy have already perished, and forever they have no more share in all that is done under the sun.  Go, eat your bread with joy, and drink your wine with a merry heart, for God has already approved what you do.  Let your garments be always white. Let not oil be lacking on your head.  Enjoy life with the wife whom you love, all the days of your vain life that he has given you under the sun, because that is your portion in life and in your toil at which you toil under the sun.  Whatever your hand finds to do, do it with your might, for there is no work or thought or knowledge or wisdom in Sheol, to which you are going.  Again I saw that under the sun the race is not to the swift, nor the battle to the strong, nor bread to the wise, nor riches to the intelligent, nor favor to those with knowledge, but time and chance happen to them all.  For man does not know his time. Like fish that are taken in an evil net, and like birds that are caught in a snare, so the children of man are snared at an evil time, when it suddenly falls upon them.