Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am travisthetechie on github.
  • I am travisthetechie (https://keybase.io/travisthetechie) on keybase.
  • I have a public key whose fingerprint is D9E4 3DEE F609 F981 04DB 53DA BF08 B086 3903 C47C

To claim this, I am signing this object:

var pathBinding = new Binding()
{
Source = "M 12.5,3.5 a 22.5,22.5 0 0,1 0,43 a 22.5,22.5 0 1,0 0,-43 z"
};
var newPath = new Path
{
Height = height,
Width = width,
Stretch = Stretch.Uniform
};
@TravisTheTechie
TravisTheTechie / Program.cs
Created July 20, 2013 13:45
UseSubscriptionService() new usage
class Program
{
static void Main(string[] args)
{
Bus.Initialize(sbc =>
{
sbc.ReceiveFrom("msmq://localhost/queue");
sbc.UseMsmq();
sbc.UseSubscriptionService("msmq://localhost/mt_subscriptions");
});
@TravisTheTechie
TravisTheTechie / gist:1906347
Created February 25, 2012 03:59 — forked from logicbomb/gist:1905604
MassTransit Bug
public interface ICommandPublisher
{
void Publish<T>(T command) where T : ICommand;
}
public class MassTransitCommandPublisher : ICommandPublisher, ILoggingSource
{
public void Publish<T>(T command) where T : ICommand
{
this.Debug("Publishing command {0}", command.GetType().Name);
@TravisTheTechie
TravisTheTechie / Main.cs
Created June 24, 2011 00:17
MonoMobile test
using System;
using System.Collections.Generic;
using System.Linq;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
using MonoMobile.MVVM;
using System.Collections.ObjectModel;
namespace MVVMExample
{
public class BalsamiqParser
{
public IEnumerable<PageObjectHierarchy> GenerateHierarchy(XDocument balsamiqXml)
{
// xml to objects
var items = balsamiqXml
.Descendants("control")
.Select(control => new PageObjectHierarchy
{
ControlTypeId = (string)control.Attribute("controlTypeID"),
@TravisTheTechie
TravisTheTechie / App.xaml.cs
Created May 24, 2011 15:04
WP7 App Using Cashbox for Mobile
public static DocumentSession Session { get; private set; }
// Code to execute when the application is launching (eg, from Start)
// This code will not execute when the application is reactivated
private void Application_Launching(object sender, LaunchingEventArgs e)
{
Session = DocumentSessionFactory.Create(FileName);
}
// Code to execute when the application is activated (brought to foreground)
@TravisTheTechie
TravisTheTechie / cashboxexample.cs
Created March 18, 2011 02:14
An example using Cashbox
using System;
using Cashbox;
public class Program
{
private static void Main(string[] args)
{
// only open one session for a given file at once
using (DocumentSession session = DocumentSessionFactory.Create("test.data"))
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="ShelfConfiguration" type="Topshelf.Shelving.ShelfConfiguration, TopShelf" />
</configSections>
<ShelfConfiguration Bootstrapper="StuffOnAShelf.AShelvedClock, StuffOnAShelf" />
<appSettings>
<add key="name" value="Coocoo" />
namespace Stuff
{
using System;
using System.IO;
using System.Timers;
using log4net.Config;
using Topshelf;
using Topshelf.Configuration;
using Topshelf.Configuration.Dsl;