Skip to content

Instantly share code, notes, and snippets.

View dpaola2's full-sized avatar

Dave Paola dpaola2

View GitHub Profile
@dpaola2
dpaola2 / gist:6fcbc58f48ae5840673ed2e5a1879276
Created March 29, 2019 19:22
Managers Path Marginalia
The Managers Path Notes
- chapter 1: management 101
- what to expect from your manager
- 1:1s
- feedback, workplace guidance
- give it fast
- manager needs to be number one ally
- ask for stretch projects
- shows you the larger picture of your work, provide sense of purpose
@dpaola2
dpaola2 / app.yaml
Created October 9, 2018 22:11
gcloud app.yaml
entrypoint: bundle exec rails s --port $PORT
env: flex
runtime: ruby
env_variables:
SECRET_KEY_BASE: REDACTED
DATABASE_HOST: /cloudsql/italic-216515:us-west1:supplier-center-prod-pg
DATABASE_USERNAME: postgres
DATABASE_PASSWORD: REDACTED
DATABASE_NAME: supplier_center_production
@dpaola2
dpaola2 / stripe_handler.js
Created September 30, 2018 23:23
Stripe Elements and Turbolinks
function doStripe() {
if (!document.getElementById('card-element')) {
return;
}
var stripe = Stripe(window.stripe_key);
var elements = stripe.elements();
var style = {};
var card = elements.create('card', {style: style});
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.014/cXML.dtd"><cXML xml:lang="en-us" version="1.2.008" payloadID="1524169905.1.943170@eden.io" timestamp="2018-04-19T13:31:45-07:00"><Header><From><Credential domain="NetworkId"><Identity>edentech-t</Identity></Credential></From><To><Credential domain="NetworkId"><Identity>staples</Identity></Credential></To><Sender><Credential domain="NetworkId"><Identity>edentech-t</Identity><SharedSecret>staples</SharedSecret></Credential><UserAgent>Eden/Genesis</UserAgent></Sender></Header><Request deploymentMode="test"><PunchOutSetupRequest operation="create"><BuyerCookie></BuyerCookie><Extrinsic name="User">Lauren Kroenung</Extrinsic><Extrinsic name="UserEmail ">lauren@eden.io</Extrinsic><Extrinsic name="Email ">lauren@eden.io</Extrinsic><Contact role="endUser"><Name xml:lang="en-US">Lauren Kroenung</Name><Email>lauren@eden.io</Email></Contact><BrowserFormPost><URL>http://wizards.egad.io:3000/punchout_orders/107/order-messa
@dpaola2
dpaola2 / punchoutsetuprequest.cxml
Created April 18, 2018 22:20
punchoutsetuprequest.cxml
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.014/cXML.dtd">
<cXML xml:lang='en-us' version='1.2.008' payloadID='1524089416.1.1993155@eden.io' timestamp='2018-04-18T15:10:16-07:00'>
<Header>
<From>
<Credential domain='NetworkId'>
<Identity>
edentech-t
</Identity>
</Credential>
@dpaola2
dpaola2 / request_response.cxml
Created April 18, 2018 22:09
Request and Response from Staples cXML
REQUEST:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.014/cXML.dtd">
<cXML xml:lang='en-us' version='1.2.008' payloadID='1524089251.1.2179199@eden.io' timestamp='2018-04-18T15:07:31-07:00'>
<Header>
<From>
<Credential domain='NetworkId'>
<Identity>
edentechnologies-t
@dpaola2
dpaola2 / query.sql
Last active December 14, 2016 23:16
WITH checkpoint_completion_counts AS (
SELECT
COUNT(checkpoint_completions.id) AS checkpoint_completions_count,
checkpoints.ref AS checkpoint_ref,
users.slug
FROM checkpoint_completions
INNER JOIN checkpoints ON checkpoint_completions.checkpoint_ref = checkpoints.ref
INNER JOIN users ON users.id = checkpoint_completions.user_id
GROUP BY 2,3
)
--- ERROR REPORT TEMPLATE -------------------------------------------------------
- What did you do?
I ran the command `/Users/dpaola2/.rvm/gems/jruby-9.0.0.0@global/bin/bundle install`
- What did you expect to happen?
I expected Bundler to...
- What happened instead?
FactoryGirl.define do
# Default enrollment has mentor
factory :enrollment do
course_start_date { 1.week.ago.beginning_of_week }
birth_date { 1.week.ago.beginning_of_week - 2.days }
class Account
...
end
class Transfer
def self.exec(acct1, acct2, amt)
Transaction.begin do
acct1.balance -= amt
acct2.balance += amt
acct1.save!