Skip to content

Instantly share code, notes, and snippets.

resources :groups do
collection :find
end
resources :email_accounts do
member :make_primary , :to => 'make_primary'
member :choose_primary , :to => 'choose_primary'
collection :find_by_email, :to => 'find_by_email'
s identify( EmailAccount => [:escaped_confirmation_id, :confirmation_code] ).match('/confirm/:escaped_confirmation_id/:confirmation_code').to(:controller => 'email_accounts', :action => 'confirm').name(:confirm)
end
require 'cgi'
class Topic
include DataMapper::Resource
Source = Enum[:web,:mobile,:partner,:migrated,:admin,:testing]
property :id, Integer, :serial => true
property :subject, String, :nullable => false, :length => 200
property :coded_subject, String, :length => 200
NoMethodError: undefined method `delete_constraint' for nil:NilClass
from /Users/aadid/Projects/website/gems/gems/dm-constraints-0.9.10/lib/dm-constraints/data_objects_adapter.rb:18:in `create_constraints_statements'
from /Users/aadid/Projects/website/gems/gems/dm-constraints-0.9.10/lib/dm-constraints/data_objects_adapter.rb:6:in `map'
from /Users/aadid/Projects/website/gems/gems/dm-constraints-0.9.10/lib/dm-constraints/data_objects_adapter.rb:6:in `create_constraints_statements'
from /Users/aadid/Projects/website/gems/gems/dm-constraints-0.9.10/lib/dm-constraints/data_objects_adapter.rb:96:in `auto_migrate_constraints_up'
from /Users/aadid/Projects/website/gems/gems/dm-constraints-0.9.10/lib/dm-constraints/data_objects_adapter.rb:93:in `each'
from /Users/aadid/Projects/website/gems/gems/dm-constraints-0.9.10/lib/dm-constraints/data_objects_adapter.rb:93:in `auto_migrate_constraints_up'
from /Users/aadid/Projects/website/gems/gems/extlib-0.9.10/lib/extlib/hook.rb:249:in `execute_after_auto_migrate_up_n
@cilquirm
cilquirm / x
Created January 21, 2009 20:02
CmdUtils.CreateCommand({
name: "delicious",
homepage: "http://ryan.codecrate.com/",
author: { name: "Ryan Sonnek", email: "[email protected]"},
contributors: ["Ryan Sonnek"],
license: "MIT",
description: "Tags the current site using delicious",
icon: "http://delicious.com/favicon.ico",
help: "Save the current url to delicious with the tags input by the user. Any selected text on the page will be recorded as the note.",
$('div.group-type li.blinded').live('click',function() {
$(this).parents('div.group-type').find('li:gt(3)').slideDown().filter('li.more').toggleClass('blinded').toggleClass('unblinded')
return false;
})
$('div.group-type li.unblinded').live('click', function() {
$(this).parents('div.group-type').find('li:gt(3)').not('li.more').slideUp().end().filter('li.more').toggleClass('blinded').toggleClass('unblinded')
return false;
})
has :n, :friendships
has :n, :friends, :through => :friendships
has :n, :college_friendships, :class_name => 'Friendship', :met_in => :college
has :n, :college_friends, :class_name => 'Friend', :through => :college_friendships
#!/usr/bin/env groovy
import groovy.util.*;
def webXml = new XmlSlurper().parse( arg[0] as File )
def grabElements = { name, map, it ->
@cilquirm
cilquirm / aim2gtalkonichat.scpt
Created June 1, 2011 14:29
Add Aim Contacts to Google Talk on iChat
tell application "iChat"
activate
repeat until status is available
delay 0.5
end repeat
set gtalk_service to first service whose service type is Jabber and name contains "gmail.com"
set aim_service to first service where service type is AIM
repeat until status of gtalk_service is available
delay 0.5
end repeat
import 'nature_nodes.pp'
node 'vagrant-default' inherits basenode {
$servergroup="test"
npgfacts::npgfact { "servergroup": val => $servergroup }
}
node 'vagrant-db' inherits basenode {
$servergroup="test"
npgfacts::npgfact { "servergroup": val => $servergroup }