Skip to content

Instantly share code, notes, and snippets.

View perryqh's full-sized avatar

Perry Hertler perryqh

View GitHub Profile
@perryqh
perryqh / core-logic-long.html
Created January 9, 2017 18:50
corelogic long form
<style>
.required:after {
color: #a0a0a0 !important;
}
.hide {
display: none !important;
}
</style>
<form action="{{the-corelogic-action-url}}" method="post" target="_blank" class="cta">
@perryqh
perryqh / shorter-form-cta.rb
Last active January 6, 2017 20:08
shorter corelogic hidden form
{
id: 1092547,
name: "CoreLogic Apply",
url: "/api/v1/locations/g5-cl-i6453t99-advantage-self-storage-jefferson-avenue/html_forms/short_apply",
external_id: "online_application_short_corelogic",
action_type: "online_application_short_corelogic",
auto_submit: true,
is_external: false,
redirect_url: null,
show_raw_form: true
@perryqh
perryqh / longer-form-apply.json
Last active January 6, 2017 20:08
Core Logic Longer Form Apply
<form action="{{set-in-dashboard}}" method="post" target="_blank" class="cta">
<input type="hidden" name="unitNumber" data-swap-value="apartment.name"/>
<input type="hidden" name="leaseTerm" value="{{lease-term-set-in-dashboard}}"/>
<input type="hidden" name="moveInDate" data-swap-value="moveInDate"/>
<input type="hidden" name="buildingId" data-swap-value="apartment.building"/>
<div class="form-field">
<label for="firstName">FirstName</label>
<input type="text" name="firstName" value="" required/>
</div>
<div class="form-field">
@perryqh
perryqh / Octopus CIRCLECI hack
Created December 2, 2016 20:12
A hacked solution to get CIRCLE CI to succeed on an octopus app
if ENV.fetch('OCTOPUS_ENABLED', true)
require 'octopus'
module Octopus
def self.shards_in(group=nil)
config[Rails.env].try(:[], group.to_s).try(:keys)
end
def self.followers
shards_in(:followers)
end
@perryqh
perryqh / instantiate_config.rb
Last active August 29, 2015 14:10
InstantiateConfig - by strategy_type
class InstantiateConfig
def self.execute(lead_params={})
location_uid = lead_params.try(:[], :location_uid)
strategy_type = lead_params.try(:[], :strategy_type)
if integration_settings = integration_settings_for(location_uid, strategy_type)
integration_settings_hash = integration_settings.properties
config_params = integration_settings_hash.merge(lead_params)
config_params[:integration_settings] = integration_settings_hash
end
@perryqh
perryqh / 0_reuse_code.js
Created January 23, 2014 15:03
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
describe 'wet signature' do
let(:req) { create(:underwriting_requirement, code: UnderwritingRequirement::WET_SIGNATURE_CODE) }
describe :has_attachments_required_for_fulfillment? do
context "revised application and replacment" do
before do
create(:document, exchange_case_id: req.exchange_case_id, tags: %w(signature replacement))
end
specify do
req.has_attachments_required_for_fulfillment?.should be_false
rvm implode
brew install rbenv
brew install ruby-build
brew install --HEAD https://raw.github.com/jasoncodes/homebrew/rbenv-vars/Library/Formula/rbenv-vars.rb #installs https://github.com/sstephenson/rbenv-vars
brew install readline
echo 'eval "$(rbenv init - --no-rehash)"' >> ~/.zshrc
exec $SHELL -i # reload the shell
CONFIGURE_OPTS="--disable-install-doc --with-readline-dir=$(brew --prefix readline)" rbenv install 1.9.3-p194
rbenv global 1.9.3-p194
module DelayedJobExtensions
class EmailJob < Struct.new(:deliver_class_name, :message)
def perform
Object.const_get(deliver_class_name).deliver(message)
end
end
def delay_email_methods(*delay_me)
klass = (class << self; self end)
delay_me.each do |attr|