Skip to content

Instantly share code, notes, and snippets.

View dpaola2's full-sized avatar

Dave Paola dpaola2

View GitHub Profile
@dpaola2
dpaola2 / cloudSettings
Last active April 15, 2020 20:45
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-04-15T20:45:26.173Z","extensionVersion":"v3.4.3"}
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
@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
<?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 }
@dpaola2
dpaola2 / operationengine.py
Created July 16, 2012 23:34 — forked from inportb/operationengine.py
operational composition and transformation in Python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
## Copyright (C) 2011 by Jiang Yio <http://inportb.com/>
## The latest code is available at <https://gist.github.com/962122>
##
## Permission is hereby granted, free of charge, to any person obtaining a copy
## of this software and associated documentation files (the "Software"), to deal
## in the Software without restriction, including without limitation the rights
## to use, copy, modify, merge, publish, distribute, sublicense, and/or sell