Skip to content

Instantly share code, notes, and snippets.

Dave Paola dpaola2

Block or report user

Report or block dpaola2

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
View gist:a2fffff1754f710fbbbde62ff537fda7
Running rails db:migrate on ⬢ zenspace-tml... up, run.9747 (Standard-1X)
D, [2019-04-17T16:58:06.441711 #4] DEBUG -- : (1.9ms) SELECT pg_try_advisory_lock(5457135974728159995)
D, [2019-04-17T16:58:06.471021 #4] DEBUG -- : (3.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
I, [2019-04-17T16:58:06.472889 #4] INFO -- : Migrating to BackfillOfficeLeaseStripeSubscriptions (20190417034742)
D, [2019-04-17T16:58:06.476873 #4] DEBUG -- : (1.1ms) BEGIN
== 20190417034742 BackfillOfficeLeaseStripeSubscriptions: migrating ===========
D, [2019-04-17T16:58:06.577611 #4] DEBUG -- : SQL (3.1ms) SELECT "office_leases"."id" AS t0_r0, "office_leases"."operator_id" AS t0_r1, "office_leases"."organization_id" AS t0_r2, "office_leases"."office_id" AS t0_r3, "office_leases"."start_date" AS t0_r4, "office_leases"."end_date" AS t0_r5, "office_leases"."created_at" AS t0_r6, "office_leases"."updated_at" AS t0_r7, "office_leases"."subscription_id" AS t0_r8, "op
View gist:6fcbc58f48ae5840673ed2e5a1879276
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 Oct 9, 2018
gcloud app.yaml
View 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 Sep 30, 2018
Stripe Elements and Turbolinks
View stripe_handler.js
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});
View punchout_setup_request.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="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 Apr 18, 2018
punchoutsetuprequest.cxml
View 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 Apr 18, 2018
Request and Response from Staples cXML
View request_response.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
View query.sql
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
)
View error.sh
--- 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?
View gist:3d0efab611f030f5c23120a21088066f
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 }
You can’t perform that action at this time.