Skip to content

Instantly share code, notes, and snippets.

View stimms's full-sized avatar
💭
Talking at #MSIgniteToronto

Simon Timms stimms

💭
Talking at #MSIgniteToronto
View GitHub Profile
<project default="dist">
<property name="airFile" value="WopsleNet.air"></property>
<property name="keyFile" value="wopsleCert.pfx"></property>
<target name="clean">
<delete file="${airFile}"></delete>
</target>
<target name="generateKey">
<exec executable="c:\WINDOWS\system32\cmd.exe">
<property name="airFile" value="WopsleNet.air"></property>
<property name="keyFile" value="wopsleCert.pfx"></property></pre>
<target name="generateKey">
<exec executable="c:\WINDOWS\system32\cmd.exe">
<arg value="/C"></arg>
<arg value="c:\hudson\tools\AdobeAir\bin\adt.bat"></arg>
<arg value="-certificate"></arg>
<arg value="-cn"></arg>
<arg value=" Wopsle"></arg>
<arg value="1024-RSA"></arg>
<arg value="${keyFile}"></arg>
<arg value="helloWorld"></arg>
<target depends="generateKey" name="dist">
<property environment="env"></property>
<replace file="application.xml" token="${buildNumber}" value="${env.SVN_REVISION}"></replace>
<exec executable="c:\hudson\tools\AdobeAir\bin\adt.bat">
<arg value="-package"></arg>
<arg value="-storetype"></arg>
<arg value="pkcs12"></arg>
[Fact]
public void timeout()
{
var observable = Observable.Never<decimal>();
int timesRun = 0;
int timeouts = 0;
observable.Subscribe(x => timesRun++);
var testScheduler = new TestScheduler();
observable.Timeout(TimeSpan.FromSeconds(1), testScheduler).Subscribe(x => timesRun++,
@stimms
stimms / TokenReplacer.cs
Last active December 10, 2015 20:48
Used to replace tokens in a string
public string ApplyTokenReplacers(string toHaveTokensReplaced, IEnumerable<string> tokens, IEnumerable<ITokenReplacer> replacers, int aggregateId)
{
foreach(var replacer in replacers)
foreach(var token in tokens)
toHaveTokensReplaced = replacer.Apply(toHaveTokensReplaced, token, aggregateId);
return toHaveTokensReplaced;
}
class AddressTokenReplacer
{
private IAddressRepository _addressRepository;
public AddressTokenReplacer(IAddressRepository addressRepository)
{
_addressRepository = addressRepository;
}
public string Apply(string toHaveTokensReplaced, string token, int aggregateId)
{
class AddressTokenReplacer
{
private IAddressRepository _addressRepository;
public AddressTokenReplacer(IAddressRepository addressRepository)
{
_addressRepository = addressRepository;
}
public string Apply(string toHaveTokensReplaced, string token, int aggregateId)
{
@stimms
stimms / rectangle1.svg
Created January 10, 2013 04:25
Simple rectangle
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" id="graph1">
<rect width="50" height="150" x="20" y="20" stroke="black" stroke-width="2" fill="#b3b3ff" />
<rect width="50" height="120" x="75" y="50" stroke="black" stroke-width="2" fill="#b3b3ff"/>
<rect width="50" height="90" x="130" y="80" stroke="black" stroke-width="2" fill="#b3b3ff"/>
<rect width="50" height="60" x="185" y="110" stroke="black" stroke-width="2" fill="#b3b3ff"/>
</svg>