Skip to content

Instantly share code, notes, and snippets.

View JaredShay's full-sized avatar

Jared Shay JaredShay

View GitHub Profile
@JaredShay
JaredShay / gist:22a9fb8d64fbe1d24eb693d7aa17117d
Created October 27, 2022 19:46
Psuedo Code for abstraction levels in w9 parser
class Airtable
API_CREDENTIALS = '123'
self.fetch
responses = call_the_airtable_api(API_CREDENTIALS)
responses.map { |r| Record.new(r) }
new(responses)
end
@JaredShay
JaredShay / set_trace_func_example.rb
Created December 1, 2018 23:19
Small snippet to use `set_trace_func`
set_trace_func proc { |event, file, line, id, binding, classname| printf "%8s %s:%-2d %10s %8s\n", event, file, line, id, classname }

Keybase proof

I hereby claim:

  • I am jaredshay on github.
  • I am jshay (https://keybase.io/jshay) on keybase.
  • I have a public key ASBlIHGoH8b28eSHlcwiQ6Q6ftJnEgQzfwTqQ55Z87M7dQo

To claim this, I am signing this object:

require 'active_record'
require 'pg'
require 'active_record_inherit_assoc'
# set up database
PG_SPEC = {
adapter: 'postgresql',
database: 'inherit_test_db'
}