Skip to content

Instantly share code, notes, and snippets.

View phatboyg's full-sized avatar

Chris Patterson phatboyg

View GitHub Profile
@phatboyg
phatboyg / Test.cs
Created May 8, 2015 18:29
Failing Test that hangs somewhere in the TPL/blocked... UGH!!
namespace MassTransit.RabbitMqTransport.Tests
{
using System;
using System.Threading.Tasks;
using Configuration;
using NUnit.Framework;
using TestFramework.Messages;
[TestFixture]
@phatboyg
phatboyg / InOrderTest.cs
Created February 3, 2015 23:51
In Order Message Test for RabbitMQ
namespace ConsoleApplication3
{
using System;
using MassTransit;
class Program
{
const int limit = 1000;
static int lastIndex = 0;
@phatboyg
phatboyg / Program.cs
Created December 27, 2014 16:30
Example of the RequestClient usage with MassTransit v3
using System;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using MassTransit;
namespace SimpleConsoleApp
{
internal class Program
{
@phatboyg
phatboyg / unpackage.sh
Created December 15, 2014 21:26
Destroy any history of packages in the Git repository
git filter-branch -f --index-filter "git rm -rf --cached --ignore-unmatch src/packages" -- --all
@phatboyg
phatboyg / Program.cs
Created November 5, 2014 23:41
Sample Topshelf service that demonstrates how features can be toggled using the Fooidity Switchyard
namespace ConsoleApplication2
{
using System;
using System.Threading;
using System.Threading.Tasks;
using Autofac;
using Fooidity;
using Topshelf;
@phatboyg
phatboyg / .gitconfig
Last active January 24, 2017 18:45
Latest Git config
[user]
name = Chris Patterson
email = ###
[merge]
tool = kdiff3
[mergetool "kdiff3"]
path = C:/Program Files/KDiff3/KDiff3.exe
[branch]
autosetupmerge = true
[core]
@phatboyg
phatboyg / Program.cs
Last active January 28, 2016 23:37
Example code and output to show the exception being thrown and Fault message being published once with MassTransit 2.9.5 and RabbitMQ
namespace Faulty
{
using System;
using MassTransit;
public interface FaultyCommand
{
string Id { get; }
}
[alias]
## Compound command alias
# View all alias
alias = !"git config --list | grep 'alias\\.' | sed 's/alias\\.\\([^=]*\\)=\\(.*\\)/\\1\\t=> \\2/' | sort"
# Pull in remote changes for the current repository and all its submodules
p = !"git pull; git submodule foreach git pull origin master"
# Stage all missing files for delete
r = !"git ls-files -z --deleted | xargs -0 git rm"
# Show all files modified using `git assume` alias
assumed = !"git ls-files -v | grep ^h | cut -c 3-"
@phatboyg
phatboyg / Code.cs
Created October 29, 2013 02:37
You can't attempt to close a generic type twice, particularly if you close it first with a generic type.
namespace ConsoleApplication1
{
using System;
using System.Collections.Generic;
class Program
{
static void Main(string[] args)
{

Hypermedia API design session

Proposed/ran by Andreas Schmidt, Nokia

Based off his design around the Nokia Places API

Notes

  • Picked JSON, no support for XML
  • Added ?accept=application/json to the URL in the browser for a raw response