Skip to content

Instantly share code, notes, and snippets.

Avatar

Dave Paola dpaola2

View GitHub Profile
View index.html
<html>
<body>
<script src="https://cdn.atomicfi.com/transact.js"></script>
<script>
Atomic.transact({
publicToken: "",
product: "deposit",
demoMode: true,
color: "#4B39EF",
onFinish: function(data) {},
@dpaola2
dpaola2 / Sidekiq Reset
Created Jan 6, 2021 — forked from unkleara/Sidekiq Reset
Sidekiq reset stats
View Sidekiq Reset
To reset processed jobs:
Sidekiq.redis {|c| c.del('stat:processed') }
To reset failed jobs:
Sidekiq.redis {|c| c.del('stat:failed') }
To reset statistics:
Sidekiq::Stats.new.reset
View webhooks_controller.rb
# typed: false
class WebhooksController < ApplicationController
protect_from_forgery except: :stripe
def stripe
payload = JSON.parse(request.body.read, symbolize_names: true)
@event = Stripe::Event.construct_from(payload)
case @event.type
when "invoice.finalized"
View adams-heroku-values.md

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@dpaola2
dpaola2 / cloudSettings
Last active Apr 15, 2020
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2020-04-15T20:45:26.173Z","extensionVersion":"v3.4.3"}
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