Revealing one's sins for others to take lesson
Q: Is it permissible for a person to reveal his past sins in the following situations:
1. With the intention of others taking lesson from it?
2. In the case where the sin is such that the one being spoken to is not involved in that sin, nor capable of doing that sin, and one reveals one's sin to him, to show him how one had changed one's life?