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
%section.panel
%header
%h1
%i.icon-home.icon-large
&nbsp&nbsp&nbspHouseholds
.content
.span12
.span-one-third
= image_tag('second_logo.jpg')
#harvest_report
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.all.count
Visit Load (408.3ms) SELECT "visits".* FROM "visits" ORDER BY visited_on DESC
%section.panel
%header
%h1
%i.icon-home.icon-large
&nbsp&nbsp&nbspHouseholds
.content
.span12
.span-one-third
= image_tag('second_logo.jpg')
#harvest_report
;;; AOM installed
aom git:(master) boot develop
Starting file watcher (CTRL-C to quit)...
Writing pom.xml and pom.properties...
Writing aom-0.1.0-SNAPSHOT.jar...
Installing aom-0.1.0-SNAPSHOT.jar...
@tbrooke
tbrooke / keybase.md
Created January 23, 2016 15:05
Keybase Identity

Keybase proof

I hereby claim:

  • I am tbrooke on github.
  • I am tbrooke (https://keybase.io/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
tbrooke / 0_reuse_code.js
Last active August 29, 2015 14:24
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@tbrooke
tbrooke / .vimrc
Created July 3, 2015 12:49 — forked from anonymous/.vimrc
set nocompatible
runtime macros/matchit.vim
if has("autocmd")
filetype indent plugin on
endif
filetype off
let mapleader=" "
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
@tbrooke
tbrooke / .zshrc
Created July 3, 2015 12:49 — forked from anonymous/.zshrc
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="robbyrussell"
source ~/bin/tmuxinator.zsh
# Example aliases
Verifying I am +tbrooke on my passcard. https://onename.com/tbrooke
@tbrooke
tbrooke / gist:9865def645faeaa5490a
Last active August 29, 2015 14:16
Service Request Abstractor Selector
$(function() {
$("#modal-1").on("change", function() {
if ($(this).is(":checked")) {
$("body").addClass("modal-open");
} else {
$("body").removeClass("modal-open");
}
});
$(".modal-window").on("click", function() {