This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
smtpd.js is SMTP server written for node.js | |
this one works with node 0.4.8 and is standalone | |
sudo node smtpd.js | |
MIT License | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module War | |
class War::Character | |
include DataMapper::Resource | |
property :id, Serial | |
has n, :raid_participations, :class_name => 'War::RaidParticipants' | |
has n, :raids, :class_name => 'War::Raid', :through => :raid_participations, :child_key => [:character_id] | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Exceptions < Merb::Controller | |
# handle NotFound exceptions (404) | |
def not_found | |
render :format => :html | |
end | |
# handle NotAcceptable exceptions (406) | |
def not_acceptable | |
render :format => :html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Exceptions < Merb::Controller | |
# handle NotFound exceptions (404) | |
def not_found | |
render :format => :html | |
end | |
# handle NotAcceptable exceptions (406) | |
def not_acceptable | |
render :format => :html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# | |
# A one file test to show ... | |
require 'rubygems' | |
gem('dm-core', '~> 0.9.8') | |
require 'dm-core' | |
require 'dm-validations' | |
# setup the logger |