I have done similar ... Bust a hole in the fuel tank of my truck after kicking up a branch in the wilds between Mono Lake and Yosemite. Climbed a hill to get my bearings (and hopefully a cell signal), and discovered a ranch off in the distance. Hiked about 8 miles with no trail to speak of, only to discover it was an unoccupied off-grid line-camp. Poked around a bit, and discovered a 5 gallon can of gas about half full ... I left a short note and the hundred dollar bill I always carry for emergencies, and carried it back to my rig. Not fun, but after strapping it under the hood, with a length of fuel line running to the pump, I made it back to civilization.
The following weekend, having located the line-camp on a map, I returned with a now full gas can, and a second as a "thank you". Nobody had collected the hundred as of yet ... so I added to the note, and left both gas cans and the money.