Skip to content

Instantly share code, notes, and snippets.

View tbrooke's full-sized avatar

Tom Brooke tbrooke

  • Brooke and Sons LLC
  • China Gove, NC 28023
View GitHub Profile
@tbrooke
tbrooke / rules.clj
Created June 25, 2021 14:55
Contract Registry
(def registry
{:user/id :uuid
:user/email :string
:user [:map {:closed true}
[:crux.db/id :user/id]
:user/email
[:user/foo {:optional true}]
[:user/bar {:optional true}]]
:msg/id :uuid
:msg/user :user/id
@tbrooke
tbrooke / json
Created June 11, 2021 22:47
Promissory Note Json
{
"$class": "org.accordproject.promissorynote.PromissoryNoteContract",
"amount": {
"$class": "org.accordproject.money.MonetaryAmount",
"doubleValue": 1000,
"currencyCode": "USD"
},
"date": "2018-01-30T00:00:00.000-04:00",
"maker": "Daniel",
"interestRate": 3.8,
[:div
{}
[:markdown/heading {:level 1} "PROMISSORY NOTE"]
[:p {} "1,000.00 USD 01/30/2018"]
[:p
{}
"FOR VALUE RECEIVED, the undersigned, \"Daniel\", an individual residing at \"1 Main Street\" (“Maker”), hereby promises to pay to the order of \"Clause Inc.\", a CORP, having offices at \"246 5th Ave, 3rd Fl, New York, NY 10001\", or its successors and permitted assigns (“Lender” or the “Company”), the principal sum of 500.00 USD, plus any and all interest accrued thereon at the Note Rate (defined below), each due and payable in cash in lawful money of the United States on the dates and in the manner set forth in this Promissory Note (this “Note”)."]
[:markdown/heading {:level 2} "Interest."]
[:p
{}
[:div
{}
[:markdown/heading {:level 1} "PROMISSORY NOTE"]
[:p {} "{{amount as \"0,0.00 CCC\"}} {{date}}"]
[:p
{}
"FOR VALUE RECEIVED, the undersigned, {{maker}}, {{#if individual}}an individual residing{{else}}a company registered{{/if}} at {{makerAddress}} (“Maker”), hereby promises to pay to the order of {{lender}}, a {{legalEntity}}, having offices at {{lenderAddress}}, or its successors and permitted assigns (“Lender” or the “Company”), the principal sum of {{principal as \"0,0.00 CCC\"}}, plus any and all interest accrued thereon at the Note Rate (defined below), each due and payable in cash in lawful money of the United States on the dates and in the manner set forth in this Promissory Note (this “Note”)."]
[:markdown/heading {:level 2} "Interest."]
[:p
{}
## Mandatory code block that determines interview order
officer.gather()
if officer[i].other_employers == True:
officer[i].employers
owner_names
## Question section
@tbrooke
tbrooke / model.cto
Last active February 22, 2020 17:07
namespace org.accordproject.offertopurchase
import org.accordproject.cicero.contract.* from https://models.accordproject.org/cicero/contract.cto
import org.accordproject.cicero.runtime.* from https://models.accordproject.org/cicero/runtime.cto
import org.accordproject.time.* from https://models.accordproject.org/v2.0/time.cto
import org.accordproject.money.MonetaryAmount from https://models.accordproject.org/money.cto
import com.docusign.connect.DocuSignEnvelopeInformation from https://models.accordproject.org/docusign/connect.cto
import org.accordproject.payment.PaymentReceived from https://models.accordproject.org/payment/payment.cto
@tbrooke
tbrooke / congressEducation.py
Created August 23, 2019 14:02 — forked from theriley106/congressEducation.py
Web Scraping congress education information
import requests
import bs4
import re
import json
listOfCongress = []
url = 'https://www.govtrack.us/congress/members/current?sort=sortname&page=1&faceting=false&allow_redirect=false&do_search=1'
congressCount = requests.get(url).json()['total']
information = {}
## Cocoon Docs: https://github.com/nathanvda/cocoon
Callbacks (upon insert and remove of items)
On insertion or removal the following events are triggered:
cocoon:before-insert: called before inserting a new nested child, can be canceled
cocoon:after-insert: called after inserting
cocoon:before-remove: called before removing the nested child, can be canceled
require "rvm/capistrano"
require "bundler/capistrano"
load "config/recipes/unicorn"
load "config/recipes/monit"
#load "config/recipes/nginx"
set :application, "pantry"
set :repository, "git@github.com:MainStMission/food-pantry-manager.git"
set :user, 'msmuser'
set :ssh_options, {:forward_agent => true}
set :use_sudo, false
food-pantry-manager git:(azure-deployment) bundle exec cap deploy
triggering load callbacks
* 2018-06-27 07:55:13 executing `deploy'
triggering before callbacks for `deploy'
* 2018-06-27 07:55:13 executing `deploy:check_revision'
* 2018-06-27 07:55:13 executing `deploy:update'
** transaction: start
* 2018-06-27 07:55:13 executing `deploy:update_code'
updating the cached checkout on all servers
executing locally: "git ls-remote git@github.com:MainStMission/food-pantry-manager.git azure-deployment"