Skip to content

Instantly share code, notes, and snippets.

View jeremy6d's full-sized avatar

Jeremy Weiland jeremy6d

View GitHub Profile
@jeremy6d
jeremy6d / gist:9510253
Created March 12, 2014 16:14
Defining a method on a model attribute within its accessor
# note that 'tags' is an array attribute in Mongoid
def tags
read_attribute(name).tap do |array|
def array.to_s
join(", ")
end
end
end
@jeremy6d
jeremy6d / apple_brine
Last active August 29, 2015 14:10
Apple brine for turkey
* 2 quarts apple juice
* 1 pound brown sugar (light or dark)
* 3/4 cup Morton Kosher Salt
* 3 quarts cold water
* 3 oranges, quartered
* 4 ounces fresh ginger, unpeeled and thinly sliced
* 15 whole cloves
* 6 bay leaves
* 6 large garlic cloves, peeled and crushed
@jeremy6d
jeremy6d / texas_bbq_sauce
Created November 29, 2014 15:02
Texas BBQ Sauce
This is a thin sauce.
* 1/2 cup cider vinegar
* 1 cup ketchup
* 1 cup water
* 6 Tbl white sugar
* 2 Tsp salt
* 2 Tsp chili powder
* 1tsp back pepper
* 1tbl New mexico chili powder
@jeremy6d
jeremy6d / gist:2825642c3bc9b77d5743
Created December 22, 2014 18:19
Documenting RPD activity near my vehicle
Around noon on December 22, 2014, I saw a Richmond Police Department pull up next to my parked car for at least 20 minutes. I was sitting indoors in front of a large window with a clear line of sight at 1657 W Broad St. My car was parked in the lot for Lowes on Broad St. In case they planted anything, I wanted to document this before I got back in my car.
@jeremy6d
jeremy6d / mar-7-smoker-schedule.md
Created March 7, 2015 15:24
Smoker Schedule for Saturday, Mar 7

Noon [1 hook in use]

  • start smoker
  • put on Jeremy’s ribs
  • prep Matt’s chickens

1pm [5]

  • put on Matt’s chickens
  • prep Brady's ribs

3pm [6]

In body.html:
<%= select_field_view :store,
:name_key => 'name',
:value_key => 'guid',
:sort_key => 'name',
:empty => 'Select a store',
:bind => {
:value => 'TestHarness.storesController.selection',
:objects => 'TestHarness.storesController.arrangedObjects'
Loading development environment (Rails 2.2.2)
>> Numeric.subclasses
=> ["Bignum", "Float", "Fixnum", "Integer", "Rational", "Date::Infinity", "BigDecimal"]
>> PortfolioCategory.superclass
=> ActiveRecord::Base
>> TypeCategory.superclass
=> PortfolioCategory(id: integer, name: string, description: text, type: string, created_at: datetime, updated_at: datetime, slug: string)
>> PortfolioCategory.subclass
NoMethodError: undefined method `subclass' for #<Class:0x19f4588>
from /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/base.rb:1833:in `method_missing_without_paginate'
Loading development environment (Rails 2.2.2)
>> PortfolioCategory.send(:subclasses)
=> []
>> TypeCategory.superclass
=> PortfolioCategory(id: integer, name: string, description: text, type: string, created_at: datetime, updated_at: datetime, slug: string)
2009-11-21 14:45:43,815 [main] INFO org.monkey.pyrot.client.NzbServer - Working directory: /Library/PreferencePanes/Pyrot.prefPane/Contents/Resources/pyrot
2009-11-21 14:45:45,191 [main] DEBUG org.monkey.pyrot.client.processors.ParRepair - No path specified, executing "which par2" to determine the full path
2009-11-21 14:45:45,192 [main] INFO org.monkey.pyrot.client.processors.Unrar - What is the final command? /Library/PreferencePanes/Pyrot.prefPane/Contents/Resources/pyrot/bin/unrar
2009-11-21 14:45:45,193 [main] DEBUG org.monkey.pyrot.client.processors.ParRepair - No path specified, executing "which par2" to determine the full path
2009-11-21 14:45:45,193 [main] INFO org.monkey.pyrot.client.processors.Unrar - What is the final command? /Library/PreferencePanes/Pyrot.prefPane/Contents/Resources/pyrot/bin/unrar
2009-11-21 14:45:45,193 [main] DEBUG org.monkey.pyrot.client.NzbServer - Loaded the config file
2009-11-21 14:45:45,437 [main] INFO org.monkey.pyrot.client.NzbServer - Looking for InternetGatewayD
PLUGIN_PATH = "vendor/plugins/community_engine/"
PLUGIN_TESTS_TO_IGNORE = ["functional/skills_controller_test.rb",
"functional/posts_controller_test.rb"].collect { |t| "#{PLUGIN_PATH}test/#{t}"}
Autotest.add_hook :initialize do |at|
at.clear_exceptions
at.clear_mappings
%w{.git .svn stories tmtags Rakefile Capfile README spec/spec.opts spec/rcov.opts vendor/gems autotest svn-commit .DS_Store }.each do |exception|
at.add_exception(exception)