Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@DrivenLogic
DrivenLogic / Dev-apt-sources.list
Last active December 17, 2015 07:39
apt sources for dev boxes
deb http://mirror.internode.on.net/pub/debian/ testing main contrib non-free
deb-src http://mirror.internode.on.net/pub/debian/ testing main contrib non-free
deb http://security.debian.org/ testing/updates main
deb-src http://security.debian.org/ testing/updates main
export EC2_ACCESS_KEY='XXX';
export EC2_SECRET_KEY='XXX';
./build-debian-cloud ec2 --volume-size 20 --filesystem ext4 --plugin plugins/admin-user --description 'Debian 7 (Wheezy)' --plugin plugins/publish-ami --plugin plugins/publish-snapshot --codename wheezy;
@DrivenLogic
DrivenLogic / NSB.Log4net.config.xml
Last active December 16, 2015 09:59
An example log4net configuration for NSB (with the non-logging config stripped out).
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="Logging" type="NServiceBus.Config.Logging, NServiceBus.Core" />
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net"/>
</configSections>
<Logging Threshold="TRACE" />
<log4net debug="false">
<appender name="console" type="log4net.Appender.ConsoleAppender">
<layout type="log4net.Layout.PatternLayout">
@DrivenLogic
DrivenLogic / NSBBootstraperExample.cs
Last active December 15, 2015 17:38
NSB Bootstraper example, with autofac scanning.
public static void InitNsbHost()
{
string[] assemblyScanerPattern = new[] {@"your.namespace.*.dll"};
// Make sure process paths are sane...
Directory.SetCurrentDirectory(AppDomain.CurrentDomain.BaseDirectory);
// begin setup of autofac >>
ContainerBuilder builder = new ContainerBuilder();
@DrivenLogic
DrivenLogic / gist:3956292
Created October 26, 2012 00:24
C# Html Decode
string encodedData = System.IO.File.ReadAllText("EncodedData.txt");
string decodedData = HttpUtility.HtmlDecode(encodedData);
Console.WriteLine(decodedData);
System.IO.File.WriteAllText("DecodedData.txt", decodedData);
Console.WriteLine("done...");
Console.ReadLine();