Skip to content

Instantly share code, notes, and snippets.

Tom Brooke tbrooke

Block or report user

Report or block tbrooke

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
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...
tbrooke /
Created Jan 23, 2016
Keybase Identity

Keybase proof

I hereby claim:

  • I am tbrooke on github.
  • I am tbrooke ( on keybase.
  • I have a public key whose fingerprint is 99F7 B22B F4FC B96D C350 7D9E B3E4 EDB9 7800 376B

To claim this, I am signing this object:

tbrooke / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
You can’t perform that action at this time.