Can not restore my iPhone 5 because of restriction passcode I was half asleep when I put a restriction passcode on for my child to play on it. 

I went to restore it so I have to turn off "find my phone " but I can't because of the restrictions. How can I solve this?
You can refer to this Github project to recover restrictions passcode from an unencrypted backup.
https://github.com/gwatts/pinfinder/blob/master/README.md