Skip to content

Instantly share code, notes, and snippets.

What's on my mind ?

Rajeev N Bharshetty rShetty

What's on my mind ?
Block or report user

Report or block rShetty

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
rShetty / gist:d740955288c82ac688d7
Created Dec 27, 2014
Off By One Second Errors
View gist:d740955288c82ac688d7
time =
Timecop.freeze(time) do
expect(merchant.reload.last_reviewed_at.utc.to_s).to eq(time.utc.to_s)
View gist:03e0693ef41544360de3
composed_of :amount,
:class_name => 'Money',
:mapping => [%w(amount value), %w(currency_id currency_id)],
:constructor => { |amount, currency_id|, currency_id) }
class Money
attr_reader :value, currency_id
View controller
def create
uploaded_file = params[:batch_payouts_csv]
unless valid_file_type?(uploaded_file)
render json: {"error_message" => I18n.t("merchant.messages.errors.invalid_file_type")}, status: 400
uploaded_csv_file =
unless uploaded_csv_file.valid_size?
View gist:4d23995a586234322552
* Basic Operations
* Prelude
* Booleans
* Comparison between different types
* Adding different types
* succ
* min, max
* Functions
* Higher Order
rShetty /
Last active Jan 3, 2016
Deploy Script For Yelloday Servers
# Bash Script to automate deploying to Heroku staging and dev servers for yelloday
usage="$(basename "$0") commit-message dev|staging-- Push to Development/Staging Server Heroku"
if [[ "$1" == "-h" ]] || [[ "$1" == "--help" ]] ; then
echo "$usage"
git stash
View test_users
password: jackbrown
password: johnbrown
password: adamdaniel
rShetty / 0_reuse_code.js
Created Nov 6, 2013
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
You can’t perform that action at this time.