Skip to content

Instantly share code, notes, and snippets.

View perryqh's full-sized avatar

Perry Hertler perryqh

View GitHub Profile
@perryqh
perryqh / architecture_violations.md
Created November 8, 2023 21:24
Recipes for fixing Architecture Violations

Recipes for Fixing Architecture Violations

This purpose of this document is to provide a guide for refactoring architecture violations.

Given

# packwerk.yml
architecture_layers:
  - admin
  - product_services
@perryqh
perryqh / db_blaster coverage badge
Last active November 19, 2021 00:23
db_blaster coverage badge
Coverage Badges
@perryqh
perryqh / pdu_test.rb
Created July 23, 2019 18:03
Testing PDU CMS staging
# ===== Staging Test =====
# Baseline. The following are the values from the "centralized" branch
garden_widget = GardenWidget.find_by(slug: 'button')
Setting.where(name: 'button_border_width').
joins(:widget).
where('widgets.garden_widget_id=:gwid', gwid: garden_widget.id).
count
# 4432
garden_widget = GardenWidget.find_by(slug: 'calls-to-action')
@perryqh
perryqh / string_is_widget_setting.rb
Created April 2, 2019 16:30
pseudo code for client urn settings
class StringIsWidgetSetting < String
attr_reader :widget
def initialize(field, widget)
super(widget.send(field))
@widget = widget
end
def method_missing(method_name, *args, &block)
widget.method_missing(method_name, args, block)
@perryqh
perryqh / log
Created May 17, 2017 19:50
prod emails
Started POST "//api/v1/emails" for 107.21.161.72 at 2017-05-17 19:49:44 +0000
2017-05-17T19:49:44.219333+00:00 app[web.1]: Processing by Api::V1::EmailsController#create as JSON
2017-05-17T19:49:44.219511+00:00 app[web.1]: Parameters: {"email"=>{"email_type"=>"Lead2lease", "lead_uid"=>"https://g5-cls-iqien81d-jr-apartments.herokuapp.com/locations/g5-cl-1gpkmfwobt-storquest-self-storage/leads/235", "form_type"=>"apply-continue", "subject"=>"‐‐New Email Lead For Default Location--", "to_email"=>"Demo.vv@lead2lease.com", "from_name"=>"no-reply", "from_email"=>"no-reply@g5searchmarketing.com", "form_friendly_fields"=>[{"name"=>"Name", "value"=>"Joey LtLtesting"}, {"name"=>"Email", "value"=>"joey.robinson+l2ltesting@getg5.com"}, {"name"=>"Tel", "value"=>"5415559393"}, {"name"=>"Desired Move-In Date", "value"=>"2017-05-17"}, {"name"=>"Message (250 character limit)", "value"=>"This is a g5 lead test. Please ignore. "}], "full_name"=>"Joey LtLtesting", "lead_name"=>"Joey LtLtesting", "category"=>"apply-continue", "
@perryqh
perryqh / lead2lease.log
Created May 17, 2017 18:40
Current g5-emails lead2lease log
2017-05-17T18:38:08.271502+00:00 app[web.1]: Started POST "/api/v1/emails" for 54.80.11.12 at 2017-05-17 18:38:08 +0000
2017-05-17T18:38:08.274267+00:00 app[web.1]: Processing by Api::V1::EmailsController#create as JSON
2017-05-17T18:38:08.274496+00:00 app[web.1]: Parameters: {"email"=>{"email_type"=>"Lead2lease", "lead_uid"=>"https://g5-cls-ikeowzze-whispering-oak.herokuapp.com/locations/g5-cl-55ty1mgoo-palo-duro-ave-nw/leads/475", "form_type"=>"contact_us_popcard", "subject"=>"‐‐New Email Lead For Default Location--", "to_email"=>"edit@example.com", "from_name"=>"CLS L2L From Email", "from_email"=>"joey.robinson+ClsL2lFromEmail@getg5.com", "form_friendly_fields"=>[{"name"=>"First Name", "value"=>"Joey"}, {"name"=>"Last Name", "value"=>"BWPctestTwo"}, {"name"=>"Email", "value"=>"joey.robinson+BWPC2@getg5.com"}, {"name"=>"Phone Number", "value"=>"54155583912"}, {"name"=>"Message (250 character limit)", "value"=>"This is a g5 lead test. Please ignore. "}], "full_name"=>"Joey BWPctestTwo", "lead_name"=>"Joey
@perryqh
perryqh / error.log
Created April 25, 2017 22:37
g5_header error
2017-04-25 17:36:15.543 [FATAL] NoMethodError - undefined method `reset_body!' for #<G5Header::HeaderRenderResponse:0x007ff3205483a8>:
actionpack (5.0.2) lib/action_controller/metal.rb:176:in `response_body='
actionpack (5.0.2) lib/abstract_controller/rendering.rb:32:in `render'
actionpack (5.0.2) lib/action_controller/metal/rendering.rb:36:in `render'
actionpack (5.0.2) lib/action_controller/metal/instrumentation.rb:44:in `block (2 levels) in render'
activesupport (5.0.2) lib/active_support/core_ext/benchmark.rb:12:in `block in ms'
/Users/phertler/.rbenv/versions/2.4.1/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'
activesupport (5.0.2) lib/active_support/core_ext/benchmark.rb:12:in `ms'
actionpack (5.0.2) lib/action_controller/metal/instrumentation.rb:44:in `block in render'
actionpack (5.0.2) lib/action_controller/metal/instrumentation.rb:87:in `cleanup_view_runtime'
@perryqh
perryqh / 1-g5-hub-api.json
Last active February 27, 2017 19:44
Cross CMS Page Copy
// GET /api/v1/cmss (better name needed)
{ "cmss": [
{"client_name": "Cody's Adventure Time",
"site_url": "https://g5-cms-iwmpeigo-cody-test-cms.herokuapp.com"
},
{"client_name": "Another Client",
"site_url": "https://g5-cms-iwmpeigo-another-client.herokuapp.com"
},
]}
@perryqh
perryqh / ab.js
Created January 10, 2017 00:57
ab
/* jshint node: true */
module.exports = function(environment) {
var ENV = {
modulePrefix: 'multi-family-iui-cards-v2',
environment: environment,
baseURL: '/',
locationType: 'auto',
EmberENV: {
PER_PAGE: 3,
@perryqh
perryqh / core-logic-hidden-form.html
Created January 9, 2017 18:53
corelogic hidden form
<form action="{{the-corelogic-action-url}}" method="post" target="_blank" class="cta">
<input type="hidden" name="unitNumber" data-swap-value="apartment.name"/>
<input type="hidden" name="leaseTerm" value="{{location_setting.default_lease_term_months}}"/>
<input type="hidden" name="moveInDate" data-swap-value="moveInDate"/>
<input type="hidden" name="buildingId" data-swap-value="apartment.building"/>
<input type="submit" class="floorplan-card-cta no-cta" data-swap-value="cta.name">
</form>