What I personally like to do is just elbow him on the top of his head then put pressure on his head, sprawl, and depending on his position, turn my hips left or right.
Single leg? Double leg? It kinda works on both. But for the single leg, you can't really strike with power because your hips and legs lack mobility. I like to hit certain areas after that (groin, eyes) then attack the elbow or hands, put pressure, and his grip will break.
But, the scenario changes a lot of things. You don't want to risk being taken to the ground, but there are some moves you can do so the attacker's position is worse and you take advantage of the hard ground. So when he takes you down, you are taken down on a soft spot where he hits his head.
Again, it's generic and it should all be instinct.
What you should be working on is footwork, so you wouldn't even get in that situation. But like you said, we all make mistakes.