Skip to content

Instantly share code, notes, and snippets.

View TheNicholasNick's full-sized avatar

Nicholas Orr TheNicholasNick

View GitHub Profile
@TheNicholasNick
TheNicholasNick / gist:1040044
Created June 22, 2011 13:04 — forked from kennethkalmer/gist:278814
node.js SMTP Server
/*
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
*/
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
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
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
@TheNicholasNick
TheNicholasNick / gist:48589
Created January 18, 2009 09:56
unique properties
#!/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