Skip to content

Instantly share code, notes, and snippets.


Tom Brooke tbrooke

View GitHub Profile
View Officers.yml
## Mandatory code block that determines interview order
if officer[i].other_employers == True:
## Question section
View model.cto
namespace org.accordproject.offertopurchase
import org.accordproject.cicero.contract.* from
import org.accordproject.cicero.runtime.* from
import org.accordproject.time.* from
import from
import com.docusign.connect.DocuSignEnvelopeInformation from
import org.accordproject.payment.PaymentReceived from
tbrooke /
Created Aug 23, 2019 — forked from theriley106/
Web Scraping congress education information
import requests
import bs4
import re
import json
listOfCongress = []
url = ''
congressCount = requests.get(url).json()['total']
information = {}
View gist:7be6133edc996e3799edd3bdbe40af17
## Cocoon Docs:
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
View deploy.rb
require "rvm/capistrano"
require "bundler/capistrano"
load "config/recipes/unicorn"
load "config/recipes/monit"
#load "config/recipes/nginx"
set :application, "pantry"
set :repository, ""
set :user, 'msmuser'
set :ssh_options, {:forward_agent => true}
set :use_sudo, false
View cap Log
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 azure-deployment"
View Harvest.html.haml
= image_tag('second_logo.jpg')
View Query Overview
Queries for Harvest Report
1 Shrink the amount of data with a scope in class Visit < ActiveRecord::Base
scope :harvest_visits, -> { where('visited_on >= ?', 3.months.ago )}
All Records (Rails Console):
Visit Load (408.3ms) SELECT "visits".* FROM "visits" ORDER BY visited_on DESC
View Harvest View
= image_tag('second_logo.jpg')
View gist:92c68d49325b5564868214d7689a6e5c
;;; AOM installed
aom git:(master) boot develop
Starting file watcher (CTRL-C to quit)...
Writing pom.xml and
Writing aom-0.1.0-SNAPSHOT.jar...
Installing aom-0.1.0-SNAPSHOT.jar...
You can’t perform that action at this time.