Genesis 39:21-23

21 But Yahweh was with Joseph, and showed kindness to him, and gave him favor in the sight of the keeper of the prison.  22 The keeper of the prison committed to Joseph's hand all the prisoners who were in the prison. Whatever they did there, he was the doer of it.  23 The keeper of the prison didn't look after anything that was under his hand, because Yahweh was with him; and that which he did, Yahweh made it prosper.