Skip to content

Instantly share code, notes, and snippets.

@epaulet
epaulet / find_location.rb
Last active October 10, 2019 18:18
Find nearby EScreen location
request_id = 36630 # replace this with the real response ID
payload = Request.find(request_id).payload
appointment = Appointment.find_by(external_donor_id: payload[:external_donor_id])
location_query = OpenStruct.new(
account_id: appointment.account_id,
exam_slugs: appointment.exam_slugs,
zipcode: payload[:collection_site_zipcode],
)
@epaulet
epaulet / webhookTest.js
Created March 13, 2019 18:43
Rainforest QA Webhook Testing
var express = require('express');
var request = require('request-promise');
var RFA = require('rainforest-auth');
var auth = new RFA('YOUR_KEY_HERE');
var app = express();
app.post('/webhooks/rainforest', function (req, res, next) {
if (req.body.callback_type != 'before_run') {
return res.send(200);
}

Keybase proof

I hereby claim:

  • I am epaulet on github.
  • I am epaulet (https://keybase.io/epaulet) on keybase.
  • I have a public key ASCOALoFEfxPquO0CQ20DQoPjbfcxcOK_34CDpq6Pl5Duwo

To claim this, I am signing this object:

@epaulet
epaulet / sales.rb
Created April 12, 2016 01:15
Simple Sales Game
DISMISSIVE_STATEMENT = 'Hmm... not quite sure... (Customer is feeling dismissive, sell harder!)'
ANGRY_STATEMENT = "This just doesn't seem like a good fit. (Customer is feeling uncomfortable, soothe them!)"
SWEET_SPOT_STATEMENT = "Tell me more... (The customer feels calm and comfortable, keep them that way!)"
interest = 0
mood = 50
MAX_MOOD = 100
MIN_MOOD = 0