I RECOGNIZE THAT CACTUS!
It's from the flash games Cactus McCoy and Cactus McCoy 2! They actually aren't that bad.
Edit: I just realized that a picture of Cactus McCoy from the Cactus McCoy subreddit was posted here, so never mind, I think.