Skip to content

Instantly share code, notes, and snippets.

View brandon-beacher's full-sized avatar
💭
🦑

Brandon Beacher brandon-beacher

💭
🦑
View GitHub Profile
CarrierWave.configure do |config|
config.fog_credentials = {
:provider => 'AWS',
:aws_access_key_id => 'xxx',
:aws_secret_access_key => 'yyy'
}
end
CarrierWave.configure do |config|
add_column :attachments, :file, :string
class Attachment < ActiveRecord::Base
mount_uploader :file, AttachmentUploader
end
attachment = Attachment.first
=> #<Attachment id: 2, created_at: "2011-05-13 22:13:22", updated_at: "2011-05-13 22:13:22", owner_type: "Suit", owner_id: 8, file: "secretsofthejavascriptninja.pdf", original_filename: "SecretsoftheJavaScriptNinja.pdf", content_type: "application/pdf">
> attachment.file
---
gem: --no-rdoc --no-ri
➜ discovery-port git:(master) ✗ gem list
*** LOCAL GEMS ***
abstract (1.0.0)
actionmailer (3.0.7)
actionpack (3.0.7)
activemodel (3.0.7)
activerecord (3.0.7)
activeresource (3.0.7)
Factory.define :drafted_defendant_request, :parent => :defendant_request do |request|
request.after_create do |r|
r.events.create!(
Factory.attributes_for(:event,
:status => 'Drafted Request',
:user => r.user ) )
end
end
--type-add=ruby=.haml,.slim,.rake,.rsel,.builder,.prawn
--type-add=html=.html.erb,.html.haml,.html.slim
--type-add=js=.js.erb
--type-add=css=.sass,.scss
--type-set=cucumber=.feature
--type-set=ejs=.ejs
--ignore-dir=javascripts
--ignore-dir=log
--ignore-dir=rails
--ignore-dir=tmp
<script type='text/javascript'>
//<![CDATA[
subdivisions_by_district['1'] = ["AINALOA","Aloha Estates Subdivision","Anuhea Volcano House Lots","Anuhea Volcano Summer Lots","Black Sand Beach","Fern Acres","Fern Forest Vacation Estates","Glenwood Gardens","Glenwood Subdivision","Green Lake Farm Lots Subdivision","Happy Homes Tract","Hawaii Island Paradise Acres Subdivision","Hawaii's Eden Roc Estates","Hawaiian Acres","Hawaiian Beaches Subdivision","Hawaiian Orchid Island Est.","Hawaiian Paradise Park","Hawaiian Parks Subdivision","Hawaiian Shores Recreational Estates","Hawaiian Shores Subdivision","Hoonanea Subdivision","Kaimu-Makena Homesteads","Kaimu-Makena Houselots","Kalanihonua Tract","Kalapana & Kupahua","Kalapana Sea View Estates","Kalapana Vacation Lots","Kamaili","Kaniahiku House Lots","Kaohe Homesteads","Kapoho","Kapoho Beach Lots","Kapoho Papaya Farms","Kapoho Vacationland","Kaueleau Farm Lots","Keaau","Keaau Agricultural Lots","Keaau Tract","Keahiala/Kauaea","Kehena Beach Estates","Keonepoko
require 'yaml'
record = []
play = true
output = File.new('records.yaml', 'r')
record = YAML.load(output.read)
output.close
puts "========= GuessIt 1.2 =========
Guess a number between 1 and 1000.
# must specify :requirements to properly match routes with punctuation in the :login parameter
# e.g. /recover/[email protected]/096c883031ce4f25bbec60bae2bfaeec1846db23
map.resources :password_keys
map.password_recovery '/recover/:login/:key', :controller => 'password_keys', :action => 'show', :requirements => { :login => /[^\/]+/ }
map.password_reset '/reset/:login/:key', :controller => 'password_keys', :action => 'update', :requirements => { :login => /[^\/]+/ }
Hi Brandon,
We're helping Square recruit awesome technical talent and I'd love to talk with you.
Square is changing the world of payments by enabling anyone to accept credit cards anywhere. You can check out some of the latest Square news here:
square.ignitiontalent.com
I think your experience is relevant to Square's challenge of building a world-class, Ruby based platform. Perhaps Square could be an exciting change for you or a colleague.