Skip to content

Instantly share code, notes, and snippets.

# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# Every Vagrant development environment requires a box. You can search for
# boxes at https://vagrantcloud.com/search.
config.vm.box = "financeit/centah"
config.ssh.forward_agent = true
# assert that the signature field is empty, with no image
page.should_not have_css(".signature_input_field img")
page.should_not have_css(".popover")
# click the "Click here to sign" link button
page.execute_script("$('##{signature_field_id} a').click()");
def self.perform
partner = Partner.find(232570)
to_delete = partner.document_checklist_items.reject {|dci| dci.file_attachments.present?}
to_delete.each { |dci| partner.document_checklist_items.delete dci }
partner.rebuild_document_checklist_items!
end
First, you need to set your GitHub username in global git config:
>
$ git config --global github.user Username
<
Then, gist.vim will ask for your password to create an authorization when you
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = 'parallel_assets_compiler'
s.version = '0.3'
s.platform = Gem::Platform::RUBY
s.author = 'Jørgen Orehøj Erichsen, Alexander Maslov'
s.email = 'joe@erichsen.net, drakmail@gmail.com'
s.summary = 'Compile assets in parallel'
s.description = 'Compile assets in parallel to speed up deployment'
@thisduck
thisduck / parallel_assets_compiler.gemspec
Created May 28, 2017 21:38 — forked from joerichsen/parallel_assets_compiler.gemspec
Microgem for compiling assets in parallel
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = 'parallel_assets_compiler'
s.version = '0.2.0'
s.platform = Gem::Platform::RUBY
s.author = 'Jørgen Orehøj Erichsen'
s.email = 'joe@erichsen.net'
s.summary = 'Compile assets in parallel'
s.description = 'Compile assets in parallel to speed up deployment'
@thisduck
thisduck / delayed_job.rb
Created May 20, 2017 16:45
delayed job profiling
# config/initializer/delayed_job.rb
module Delayed
module Plugins
class Flaming < Plugin
callbacks do |lifecycle|
lifecycle.around(:invoke_job) do |job, *args, &block|
HelperMethods.flaming(name: "DELAYEDJOB--#{job.name}") do
block.call(job, *args)
end
def audit_required_messages
messages = []
if requires_first_loans_audit? && !lender_program_config.exempt_from_first_loans_audit?
config = lender.try(:lender_config) || DefaultLenderConfig.new
messages << "less than #{config.new_partner_satisfaction_call_quantity} loans disbursed"
end
if vertical.try(:name) == "Home Improvement"
messages << "Home Improvement loan"
%td.right{valign: "top"}
- if role[:user].email.present? && logs.present?
%em.status-label{"data-toggle" => "tooltip", "data-placement" => "bottom", title: t("loan_steps.esignature_states.#{role[:state].downcase}_tooltip", email:role[:user].email, date: logs.first.created_at.to_s(:date_only), default: "#{role[:state]}"), class: role[:state].downcase}
=t("loan_steps.esignature_states.#{role[:state].downcase}")
def update_bank_account
bank_account = BankAccount.find params[:bank_account_id]
bank_account.attributes = params[:bank_account]
bank_account.purgatory!(current_user)
end