Skip to content

Instantly share code, notes, and snippets.

View slavakisel's full-sized avatar

Viacheslav Kysil slavakisel

View GitHub Profile

Overview

As Rhino continues to scale, so does its need to expand and diversify the market access partners (MAPs) in which it writes premium under. There is a need to scale the logic and framework in which we route policies to each carrier. We will have to update the way we store insurance carrier attributes and route New / Renewal Policies to a particular carrier. Proposed solutions are available on this miro board.

Goals

Create scalable solution to onboarding a new insurance carrier and prices, generates policy, reports, and directs claims within our system.

Non Goals

We are not touching reporting system (bordereau reports, NSIC reports, etc.) in this version.

Portal
sql = "
SELECT DISTINCT insurance_policies.id FROM units
LEFT JOIN properties ON (properties.id = units.property_id)
LEFT JOIN property_owners ON (property_owners.id = properties.property_owner_id)
LEFT JOIN yardi_residents ON (yardi_residents.tenant_id = units.tenant_id)
LEFT JOIN insurance_policies ON (insurance_policies.tenant_id = yardi_residents.tenant_id)
LEFT JOIN policy_revisions ON (policy_revisions.insurance_policy_id = insurance_policies.id)
WHERE property_owners.name = 'Highmark Residential' AND units.tenant_id is NOT NULL AND
policy_number subscription_id email Date of Request
CUS066001358 sub_EWBikzqBdlVRQX [email protected] 6/9/2020
CUS066001409 sub_EbkRPMNRWf9zeS [email protected] 6/9/2020
CUS066001429 sub_EdDVf2c2rmR3w2 [email protected] 6/9/2020
CUS066001431 sub_EdKNVSAANZtkm1 [email protected] 6/9/2020
CUS066001443 sub_EdyfQtEDXpLR9I [email protected] 6/9/2020
CUS066001467 sub_EfCkl8AxHVMNJN [email protected] 6/9/2020
CUS066001488 sub_Ehhk4cpk3OoCqz [email protected] 6/9/2020
CUS066001502 sub_EitmQphsYSyg78 [email protected] 6/9/2020
CUS066001521 sub_EkhBkpJDSDbVC8 [email protected] 6/9/2020
#!/usr/bin/env /usr/local/var/rbenv/shims/ruby
# plugin script for https://getbitbar.com
require "monobank" # https://github.com/bezrukavyi/monobank-ruby
TOKEN = "..."
info = Monobank::ClientInfo.show(TOKEN)
module Inspector
extend ActiveSupport::Concern
included do
def inspect
inspection = @attributes ? inspected_attributes : "not initialized"
"#<#{self.class} #{inspection}>"
end
module Actions
class Message
TYPES = %w(
PUSH_MESSAGE
REMOVE_MESSAGE
).freeze
attr_reader :type, :options
def initialize(type, options)
<form method="post" action="https://form2chat.io/f/asdfasdf">
<input type="text" name="name" placeholder="Name">
<input type="text" name="contact" placeholder="Email or orther contact">
<textarea name="message" placeholder="Message"></textarea>
<input type="submit" value="Send message">
</form>
@slavakisel
slavakisel / zen.github.js
Created April 19, 2017 08:18
Random zen wisdom for GitHub pull request
var request = require('request');
/**
* Creates a comment to each new pull request with a random string of GitHub zen.
* Comment API reference: https://developer.github.com/v3/issues/comments/#get-a-single-comment
*
* INSTALLATION
* Add a webhook to your GitHub repository with application/json content type:
* https://wt-474e7289cddab09085e8d7fc9726b482-0.run.webtask.io/zen
*
@slavakisel
slavakisel / azure.rb
Last active April 20, 2016 09:40
How to create azure container in ruby
# Use Azure ruby sdk https://rubygems.org/gems/azure
require "azure"
Azure.config.storage_account_name = "your storage account name"
Azure.config.storage_access_key = "use any of 2 account API keys"
azure_blob_service = Azure::Blob::BlobService.new
begin
# set public access to either 'container' (default) or 'blob'. Note that 'container' is not visible to public
container = azure_blob_service.create_container("images", public_access_level: "blob")
class DigitsPyramid
def initialize(num)
@num = num.to_s
end
def next
this = @num
@num = @num.chars.chunk { |c| c }.map do |digit, group|
[group.size, digit]