Maybe this has happened to you: you and your friends walk out of a bar, movie or restaurant somewhere in the city. You're ready to head home and stroll over to the bike rack. But your bicycle isn't there. All you see is a wheel, a broken lock, or worse -- nothing at all. And all you're left with is a horrible sinking feeling in your stomach that you'll never see it again.

But all is not lost! In our tech-savvy town, law enforcement, companies, and others are using an array of online tools to prevent theft and track down stolen bicycles. When I had a mountain bike stolen several years ago, I was able to find it by spreading the word via flyers, email and social media. Ultimately, a Facebook post spotted by a mutual friend was the key to its return; she reclaimed it when she spotted it at the Laney College Flea Market in Oakland.

One significant takeaway from this experience was the realization that there was no easily accessible, centralized resource for victims. I decided to create a Google group where users could post about their stolen bicycles and find a comprehensive list of tips for both prevention and recovery. And I began to connect with other folks who were already deeply involved in the effort, such as Bryan Hance of stolenbicycleregistry.com and Officer Matthew Friedman of SFPD's Park Station Anti-Bike Theft Unit. (He was recently profiled in this New York Times video and oversees the @SFPDBikeTheft Twitter handle.)

As bike theft continues to rise with increasing ridership -- there's been a 70% increase in San Francisco in the past five years -- a whole host of apps, devices and websites are cropping up on a regular basis. But there's no substitute for taking basic preventative measures, so here's a handy checklist of how to keep bike thieves at bay.

Now, if you have the misfortune of getting your bicycle stolen, here's what you should do:

File a police report. It's better to walk into a station to report it stolen than file it online; it'll get processed much faster. Try to have proof of ownership with you, such as the serial number or store receipts. Bicycles valued at over $1000 merit an investigation (read more here). And message Ofc. Friedman on his aforementioned Twitter account or call him at his Park Station office.

Register it at stolenbikeregistry.com.

Start spreading the word on your social networks. (This was instrumental in recovering a vintage Italian bicycle that had been missing for over 6 years, as well as a set of my wheels.)

Scan Craigslist and eBay to see if it pops up for sale. This online tool, IFTTT.com, is an easy method for setting custom alerts so you receive an email anytime a listing matching your bike's description gets posted on these websites.

Go to your local flea markets right away and see if it’s being sold there. You can also join this Flickr group, if you’re in the Bay Area, to share and peruse images taken at Laney College, Ashby, Coliseum and other venues.

While looking for your stolen bike may feel like a part-time job, you may get it back if you keep up the effort. I've heard many wonderful recovery stories from determined folks who successfully hunted down their bicycles, but the most important thing is to try and not get it snatched up in the first place. Keep your bicycles safe and happy riding!