Skip to content

Instantly share code, notes, and snippets.

View sawilde's full-sized avatar

Shaun Wilde sawilde

View GitHub Profile
@chillitom
chillitom / msbuild.targets
Created December 17, 2012 22:37
XSLT to convert OpenCover xml to NCover 1.x format for use with Bamboo
<!-- example msbuild target -->
<Target Name="TranslateCoverageXml">
<ItemGroup>
<CoverageFiles Include="$(TestsDir)\*.opencover" />
</ItemGroup>
<XslTransformation XmlInputPaths="%(CoverageFiles.Identity)"
XslInputPath="$(MSBuildProjectDirectory)\opencover_to_ncover.xslt"
OutputPaths="$(TestsDir)\%(CoverageFiles.FileName).ncover.xml" />
@gregoryyoung
gregoryyoung / gist:1500720
Created December 20, 2011 08:00
Greg's Stop Loss Kata
Greg's Stop Loss Kata
Testing is very hard when time is involved ...
A trailing stop loss is a term used in financial trading. For a very in depth explanation you can read here http://www.investopedia.com/articles/trading/03/080603.asp and http://en.wikipedia.org/wiki/Order_(exchange)#Stop_orders
However we do not need a huge amount of background in order to do the kata as we are going to limit the problem a bit.
The general idea is that when you buy into a stock at a price say $10. You want it to automatically get sold if the stock goes below $9 (-$1). If we use the term "trailing" that means that id the price goes up to $11 then the sell point becomes $10.