Tag Archives: Ruby

Facebook Page Analytics

with Ruby On Rails

I decided to flex my programming muscle and try something new. I’ve done Ruby for CLI tools and Chef cookbooks but never a Ruby on Rails (RoR) application. Much of the hype with RoR is gone these days but it’s been around long enough to be considered tested and somewhat mature like an old elitist hipster… If that makes sense.

tldr; Just give me the source

Description

The project was to create a Rails applications that provides analytics for the last 100 Facebook posts of a Facebook page. As a user, you should be able to login using Facebook, see a list of pages that you have authorized admin access to, and lastly see a display of the pages’ top 5 posts (out of the last 100) as well as a sortable table of the 100 most recent posts.

Read More
Dec 20, 2015 6 min read

A thing or two about style guides

A style guide should be chosen when working on a solo project or with a team. This keeps the code manageable when you or your peers come back to work on it in the future. It doesn’t matter which style guideline you choose as long as you stick with it. In a sense, writing clean code will also help reduce technical debt. Below is a collection of style guides that I collected over time. Some important rules are repeated in other styles. It’s nice to keep consistency (to a degree) if you are writing in multiple programming languages but ultimately it’s best to do what’s best for each language.

“Any fool can write code that a computer can understand. Good programmers write code that humans can understand.”

Martin Fowler, Refactoring: Improving the Design of Existing Code

Read More
Feb 8, 2015 2 min read

My cask script!

Say goodbye to manual installations

Finally we get our own apt-get like tool for Mac! Check out cask if you haven’t already! Below is my personal script for my setup. Maybe I’ll move this to chef recipe for my mac one day? ;)

Read More
Oct 26, 2014 1 min read

Chef Gearman Cookbook v0.1.0

A little Gearman cookbook I put together for Chef. Supports installing multiple versions by source. Also has a recipe for the PHP extension.

Grab it from GitHub!

kthxbye.

Read More
Jun 12, 2014 1 min read

Update Chef Solo on your Vagrant

Install vagrant-omnibus:

vagrant plugin install vagrant-omnibus

Configure your Vagrantfile before provisioning to the latest version of Chef:

config.omnibus.chef_version = :latest

You can also upgrade to a specific version like so:

config.omnibus.chef_version = "11.12.8"
Read More
Jun 10, 2014 1 min read