Skip to content

Instantly share code, notes, and snippets.

View dbettin's full-sized avatar

Dave Bettin dbettin

  • Portland, Oregon
View GitHub Profile
@dbettin
dbettin / es6.js
Created June 11, 2022 15:01
es6 module
export default {
// request is a string
async fetch(request) {
return "I’m a module!";
}
}
@dbettin
dbettin / WebApi-Nlog
Created January 24, 2013 19:25
WebApi Nlog Configuration Example
NLogTraceWriter.ConfigureRenderers();
var config = new LoggingConfiguration();
var target = new FileTarget
{
AutoFlush = true,
CreateDirs = true,
FileName = "${basedir}/my_log_file.log",
Layout = "${level}|${message}| ${webapi-trace:kind=true}|"
};
@dbettin
dbettin / test.rb
Created November 16, 2010 16:33
Rspec goodness
describe "responder" do
it ("should be a G5Api::ApiResponder") { subject.responder.should == G5Api::ApiResponder }
end
it ("should respond to xml mime type") { subject.mimes_for_respond_to.should have_key :xml }
it ("should respond to json mime type") { subject.mimes_for_respond_to.should have_key :json }
it "should add skip types option before xml serialization" do