3 ms·
A few years ago I started taking up running regularly but I didn't have a buddy that I could run with so I decided to adopt a dog. Unfortunately the shelters we
by wunderbaba 4y ago
A few years ago I started taking up running regularly but I didn't have a buddy that I could run with so I decided to adopt a dog. Unfortunately the shelters were relatively far away from my home making it inconvenient to go in and check continuously on the weekends. I later realized that nearly all of them connected to a central city database which contained all of the dogs in the nearby shelters and furthermore that that database was behind a publicly available rest endpoint.
I whipped up a program that periodically every 10 minutes would query the database filtering for dogs matching the qualifications I was looking for using a combination of regex to search for any dogs that were:
- Between 50 and 100 lbs
- Did not have a history of behavioral problems
- Matched a list of active breeds
When it found a potential match it would send an SMS via Twilio to my phone with a picture of the dog, a link to the shelter, and a picture.
Several years later my huskee / Pyrenees hybrid is the best running partner I could ever have asked for. That's my proudest hack and I think she would agree with me.