In Genesis 40, the Pharoah threw his butler and baker into prison for upsetting him. They both had dreams the first night they were in prison and Joseph interpreted them.
The butler dream was as follows: "I saw a vine in front of me, and on the vine were three branches. As soon as it budded, it blossomed, and its clusters ripened into grapes. Pharaoh's cup was in my hand, and I took the grapes, squeezed them into Pharaoh's cup and put the cup in his hand." Joseph interpreted that the Pharaoh would forgive the butler in three days.
The baker's dream was as follows: "On my head were three baskets of bread. In the top basket were all kinds of baked goods for Pharaoh, but the birds were eating them out of the basket on my head." Joseph said that in three days the Pharaoh would hang the baker.