Skip to content

Instantly share code, notes, and snippets.

View srikanthps's full-sized avatar

Srikanth Shreenivas srikanthps

  • Dell EMC
  • Bangalore, INDIA
View GitHub Profile
# In your local clone of your forked repository, you can add the original GitHub repository as a "remote".
# ("Remotes" are like nicknames for the URLs of repositories - origin is one, for example.)
# Then you can fetch all the branches from that upstream repository, and rebase your work to continue
# working on the upstream version. In terms of commands that might look like:
# Add the remote, call it "upstream":
git remote add upstream git://github.com/whoever/whatever.git
# Fetch all the branches of that remote into remote-tracking branches,
@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:

@srikanthps
srikanthps / README.txt
Created June 18, 2011 17:13
Ruby Application to create twitter tweets - "Tweeter"
Tweeter Application:
This application can be used to create tweet programmatically.
Pre-requisites:
==============
1. In order to use it, you need to have "twitter_oauth" gem installed.
gem install twitter_auth
2. Register an application on http://dev.twitter.com/. Select the "Application Type" as "client", as this program does is not a web-based application and hence, cannot have call back URL as needed for browser apps.