Skip to content

Instantly share code, notes, and snippets.

View andeemarks's full-sized avatar

Andy Marks andeemarks

View GitHub Profile
@andeemarks
andeemarks / gist:3a4e845e919ee8185608
Created August 26, 2014 23:34
Hard-coding Vagrant CentOS guest timezone
config.vm.provision "shell" do |s|
s.inline = "sudo ln -sf /usr/share/zoneinfo/Australia/Sydney /etc/localtime; echo $?"
end
@justinko
justinko / Plea.markdown
Created May 30, 2012 19:40
Am I doing it wrong?

Dear Rubyists,

I just lost a contract because of my code in a Rails project.

The specific code in question is related to a "posting a comment" feature. Here are the details:

In this project, "posting a comment" does not simply entail inserting a row into the database. It involves a procedure to yes, insert a row, but also detect its language, check for spam, send emails, and "share" it to Twitter and Facebook. I believe this algorithm should be encapsulated. I do not believe it belongs in a controller or a model. I do not believe Active Record callbacks should be used.

The "senior developer", whom is the stake holder's right hand man, said this: