I always lose that little book with all the device codes.
And it's absurdly difficult to find them online! You'd think you'd be able to find, like, a PDF, but half the time the brand name on the remote itself isn't actually the manufacturer (like this "RCA" remote that's obviously been licensed to a third-party) and even if they do have manuals on their website it's hard to find the exact one for your remote.
I've actually just said "fuck it, I'll buy a new remote" in the past when this has happened...