Skip to content

Instantly share code, notes, and snippets.

View mpeychich's full-sized avatar

Matthew Peychich mpeychich

  • Goldstar
  • Portland, OR, USA
View GitHub Profile

Keybase proof

I hereby claim:

  • I am mpeychich on github.
  • I am mpeychich (https://keybase.io/mpeychich) on keybase.
  • I have a public key ASDEAv2skZc96di7bkhLdEFv9mljnDt9ALc5QhKPiIgu-go

To claim this, I am signing this object:

@mpeychich
mpeychich / gist:193063
Created September 24, 2009 21:22 — forked from rgraff/gist:193060
def should_assign_to(*names)
names.each do |name|
it "should assign @#{name}" do
assigns(name.to_sym).should_not be_nil
end
end
end
module EnablerDisabler
def enable(method)
self.class.send(:class_variable_get, '@@enabler_status')[method.to_s] = true
end
def disable(method)
self.class.send(:class_variable_get, '@@enabler_status')[method.to_s] = false
end
def self.included(base)
Factory.define :venue do |v|
v.name 'Foo Place'
v.url {Factory.next(:url_slug)}
v.address_hint 'MyString'
v.phone '(805) 555-1212'
v.capacity 'MyString'
v.website 'example.com'
v.image 'MyString'
v.description 'MyText'
v.directions 'MyText'
# done
# -- Matthew Peychich
Factory.define :venue do |v|
v.name 'Foo Place'
v.url {Factory.next(:url_slug)}
v.address_hint 'MyString'
v.phone '(805) 555-1212'
v.capacity 'MyString'
v.website 'example.com'
v.image 'MyString'
module HasAUMedia
def self.included(base)
base.class_eval do
has_many :attachments, :class_name => 'UserAttachment', :as => :attachable
has_many :videos, :class_name => 'UserAttachment::Video', :as => :attachable
has_many :images, :class_name => 'UserAttachment::Image', :as => :attachable
end
end
end
#!/bin/sh
##
## sign.sh -- Sign a SSL Certificate Request (CSR)
## Copyright (c) 1998-2001 Ralf S. Engelschall, All Rights Reserved.
##
# argument line handling
CSR=$1
if [ $# -ne 1 ]; then
echo "Usage: sign.sign <whatever>.csr"; exit 1
ParseTree (3.0.3, 3.0.2)
RedCloth (4.1.9, 4.1.1)
RubyInline (3.8.1)
Selenium (1.1.14)
ZenTest (4.0.0, 3.11.1, 3.11.0, 3.4.1)
actionmailer (2.3.2, 2.3.0, 2.2.2, 2.1.2, 2.1.1, 2.1.0, 2.0.0, 1.3.6, 1.3.5, 1.3.4, 1.3.3, 1.3.2)
actionpack (2.3.2, 2.3.0, 2.2.2, 2.1.2, 2.1.1, 2.1.0, 2.0.0, 1.13.6, 1.13.5, 1.13.4, 1.13.3, 1.13.2)
actionwebservice (1.2.6, 1.2.5, 1.2.4, 1.2.3, 1.2.2)
activemerchant (1.4.1, 1.4.0)
activerecord (2.3.2, 2.3.0, 2.2.2, 2.1.2, 2.1.1, 2.1.0, 2.0.0, 1.15.6, 1.15.5, 1.15.4, 1.15.3, 1.15.2)