Skip to content

Instantly share code, notes, and snippets.

var defaults = {
selectors: {
fullname: "#fullname",
firstname: "#firstname",
lastname: "#lastname"
}
};
var nameConcatenater = function (options) {
namespace NancyKatana
{
using Owin;
public class Startup
{
public void Configuration(IAppBuilder app)
{
app.UseNancy();
}
public class TestRenderContextFactory : IRenderContextFactory
{
private IViewResolver viewResolver;
private IViewCache viewCache;
public TestRenderContextFactory(IViewResolver viewResolver, IViewCache viewCache)
{
this.viewResolver = viewResolver;
this.viewCache = viewCache;
}
public interface IRepository<T> : IDisposable
{
IQueryable<T> GetAll();
IQueryable<T> Query(string sql, params object[] args);
IQueryable<T> PagedQuery(long pageNumber, long pageSize, string sql, params object[] args);
T Get(object key);
void Add(T entity);
void Delete(T entity);
@jchannon
jchannon / gist:3314090
Created August 10, 2012 13:08 — forked from idan/gist:3135754
A Sample Post

Hello there! This is a sample post for gist.io, a super-lightweight writing soapbox for hackers.

Now look up. Further. Above the post title. See that grey text with the gist ID?

Now back to me. That grey text is a link! Open that sucker in a new tab to see the source for this post. Also, I'm on a horse.

This is a major heading

If you peek at it with a web inspector, you'll see that it is a second-level heading. You can use first level headings, but they'll look just like the second level ones, and the gods of the HTML5 outlining algorithm will frown upon you.

namespace NinjectTest
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
public class Action : IGenre
{
public string GetTopTenMoviesInGenre()
@jchannon
jchannon / gist:2171067
Created March 23, 2012 14:21 — forked from ianbattersby/gist:2159466
Factory Pattern FTW!
public class MainEntryPointClass : BaseClass
{
private ILogicFactory LogicFactory;
public MainEntryPointClass(ILogicFactory LogicFactory)
{
LogicFactory = LogicFactory;
}
public MainEntryPointClass() : this(new LogicFactory())
public class MainEntryPointClass : BaseClass
{
private ILogic Logic;
private IFileLogger FileLogger;
public MainEntryPointClass () : this(new Logic())
{
}
public IFileLogger FileLogger { get; set; } // For property injection for TDD or (e.g.) AutoFac