Skip to content

Instantly share code, notes, and snippets.

View dpaola2's full-sized avatar

Dave Paola dpaola2

View GitHub Profile
dpaola2 /
Created December 13, 2022 17:26
Dave's Pairing Exercise

Dave's Pairing Exercise

Hello and thanks for spending some time pairing with me! This exercise is an opportunity for us to try out working together and hopefully have some fun writing code!

  • This exercise is open ended and collaborative. There are no set goals or evaluation metrics.
  • We have 60 minutes together, and as that is not a lot of time, we should spend it wisely and make sure we make the most of it.
  • It's best to use the candidate's (your) machine, in their most comfortable environment/IDE, while sharing screen.
  • It's recommended to use the language/framework you are most familiar with, and choose a task that would be best in this language/framework (it's not the day for trying a new language :) )
  • Bonus points if you run rails new/npm install/composer create-project/etc beforehand so that we can get started a bit faster
ruby-2.6.8 - #removing src/ruby-2.6.8 - please wait
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/13.0/x86_64/ruby-2.6.8.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Certificates bundle '/usr/local/etc/openssl@1.1/cert.pem' is already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/dave/.rvm/rubies/ruby-2.6.8, this may take a while depending on your cpu(s)...
ruby-2.6.8 - #downloading ruby-2.6.8, this may take a while depending on your connection...
ruby-2.6.8 - #extracting ruby-2.6.8 to /Users/dave/.rvm/src/ruby-2.6.8 - please wait
def javascript_to_elixir(js_code)
# Define a method that will convert JavaScript keywords to Elixir
define_method :convert_keyword do |keyword|
case keyword
when "function"
when "var"
when "let"
"_id": "1661312886559-1055787122967",
"coreID": "33304708393730393c001d00",
"locationID": "1654872368417-0895177245456",
"name": "WaterLeak",
"severity": 2,
"start": "2022-08-24T03:48:03.000Z",
"displayName": "Leak",
"details": {
"totalLiters": 24846.9575699462,
<script src=""></script>
publicToken: "",
product: "deposit",
demoMode: true,
color: "#4B39EF",
onFinish: function(data) {},
dpaola2 / Sidekiq Reset
Created January 6, 2021 18:51 — forked from unkleara/Sidekiq Reset
Sidekiq reset stats
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:
# typed: false
class WebhooksController < ApplicationController
protect_from_forgery except: :stripe
def stripe
payload = JSON.parse(, symbolize_names: true)
@event = Stripe::Event.construct_from(payload)
case @event.type
when "invoice.finalized"

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 / cloudSettings
Last active April 15, 2020 20:45
Visual Studio Code Settings Sync Gist
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