Ruby, Cron and Instagram

Instagram is an effective visual medium to help you keep your marketing effort in high gear. But you need a way to tie it to all your other online social activities so that your followers can get a centralized view. For example, you may want to link your latest four Instagram postings to your blog by offering a picture and a link for each entry on your blog’s landing page.

This article describes how you can use Instagram’s API to capture your latest activity and periodically (e.g.; every 15 minutes) update your website. It uses Ruby to do the hard work, and runs periodically using a Linux cron job.
Continue reading

Ruby Sinatra Authentication

Topics like authentication often give me the heebie-jeebies. I worry about nefarious hackers in some corner of Beijing trying to hack into my account by somehow circumventing the authentication mechanism I put in place. To fight the situation, I would write the entire authentication routines myself, but I worry that I haven’t tested it thoroughly; on the other hand, I worry about using a library solution that I don’t fully understand and could therefore leave myself open to an attacker that does fully understand the solution.

A good compromise is to understand a bit about authentication and then use a known solution. When it comes to Sinatra, both are within easy grasp.
Continue reading