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:

public interface IKeyedObject<T>
{
T Key { get; }
}
@TravisTheTechie
TravisTheTechie / PwnQueues.ps1
Created February 11, 2010 19:30
Grants rights to a given user for queues matching the regex.
#GetQueueOwnership
param
(
[string] $queueNameRegex,
[string] $userName
)
[Void][System.Reflection.Assembly]::LoadWithPartialName("System.Messaging")
[System.Messaging.MessageQueue]::GetPrivateQueuesByMachine("localhost") |
namespace StuffOnAShelf
{
using System;
using System.IO;
using System.Timers;
using log4net;
using log4net.Config;
using Topshelf.Configuration.Dsl;
using Topshelf.Shelving;
namespace Stuff
{
using System;
using System.IO;
using System.Timers;
using log4net.Config;
using Topshelf;
using Topshelf.Configuration;
using Topshelf.Configuration.Dsl;
<?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" />
@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"))
@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)
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 / 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
{