Skip to content

Instantly share code, notes, and snippets.

View mickdelaney's full-sized avatar

mick delaney mickdelaney

View GitHub Profile
@mickdelaney
mickdelaney / Link Transformed Config Files .Net Projects
Created January 21, 2011 18:48
App/Web Config Files Shared By Linking With Web Config Transformations
@mickdelaney
mickdelaney / structuremap domain events
Created October 12, 2011 13:13
structuremap open generic types for domain events
public interface IGenericEvent : IDomainEvent {}
public class SomethingHappenedEvent : IGenericEvent {}
public class SomethingElseEvent : IGenericEvent { }
public class SomeHappenedHandler : IHandleEvent<SomethingHappenedEvent>
{
public void Handle(SomethingHappenedEvent msg) {
Console.WriteLine("Event happened");
}
@mickdelaney
mickdelaney / gist:2053421
Created March 16, 2012 22:54 — forked from jeserkin/gist:1953801
Twitter Bootstrap Fluid-Sticky example. Modified martinbean example.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Bootstrap, from Twitter</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link href="../assets/css/bootstrap.css" rel="stylesheet">
<style type="text/css">
@mickdelaney
mickdelaney / gist:2053426
Created March 16, 2012 22:54
Sample HTML page with Twitter's Bootstrap, Ryan Fait's Sticky Footer, and a full-width footer
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="author" content="Martin Bean" />
<title>Twitter&rsquo;s Bootstrap with Ryan Fait&rsquo;s Sticky Footer</title>
<link rel="stylesheet" href="css/bootstrap.min.css" />
<style>
html, body {
height: 100%;
@mickdelaney
mickdelaney / gist:2053899
Created March 17, 2012 00:40 — forked from showell/gist:1663926
object creation pattern
root = this
$ = jQuery
root.logger = do ($) ->
logContainer = null
write = (msg) ->
logContainer.append("<p>#{msg}</p>")
pub =
init: (el) -> logContainer = el
log: (msg) -> write msg
@mickdelaney
mickdelaney / ESSagaRepo.cs
Created April 4, 2012 14:42 — forked from haf/ESSagaRepo.cs
Spike MassTransit EventStore Saga Repo
// Copyright 2007-2011 Henrik Feldt
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use
// this file except in compliance with the License. You may obtain a copy of the
// License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed
// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
$ cat ~/.sbtconfig
SBT_OPTS="-XX:+CMSClassUnloadingEnabled -XX:PermSize=128M -XX:MaxPermSize=256M"
input {
tcp {
type => "syslog"
host => "127.0.0.1"
port => 3514
}
tcp {
type => "eventlog"
host => "10.1.1.2"
port => 3515
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace MassTransit.AutomatonymousTests
{
using System.Threading;
using Automatonymous;
using Magnum.Extensions;
public class AccountSpecifications
{
public Specification when_constructing_an_account = new
ConstructorSpecification<Account>()
{
When = () => new Account("Jane Smith", 17),
Expect =
{
account => account.AccountHolderName == "Jane Smith",
account => account.UniqueIdentifier == 17,