Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE cruisecontrol [
<!ENTITY ProjectName SYSTEM "ProjectConfigs\ProjectName.config">
]>
<cruisecontrol>
&ProjectName;
</cruisecontrol>
<!DOCTYPE cruisecontrol [
<!ENTITY ProjectName SYSTEM "ProjectConfigs\ProjectName.config">
]>
<cruisecontrol>
&ProjectName;
</cruisecontrol>
<project name="Project Name (Stage)">
<workingDirectory>C:\Projects\ProjectNameStage\work</workingDirectory>
<artifactDirectory>C:\Projects\ProjectNameStage\art</artifactDirectory>
<sourcecontrol type="svn">
<trunkUrl>repoUrl</trunkUrl>
<executable>C:\Program Files\SlikSvn\bin\svn.exe</executable>
</sourcecontrol>
<triggers>
<?xml version="1.0" encoding="utf-8"?>
<ArrayOfGeoPlaceDistance
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://skats.net/services/literalTypes">
<GeoPlaceDistance>
<ToPlace>84142</ToPlace>
<ToState>UT</ToState>
<Distance>1</Distance>
</GeoPlaceDistance>
@mattkruskamp
mattkruskamp / XLinq.cs
Created November 9, 2010 17:05
This is how to get the XLinq solution
// get the xml from a url that I have created
XElement doc = XElement.Load(url);
// grab the namespace declaration
XNamespace na = doc.GetDefaultNamespace();
// append it to all the queries
var elements = from e in doc.Elements(na + "GeoPlaceDistance")
select e.Element(na + "ToPlace");
@mattkruskamp
mattkruskamp / dive.js
Created February 23, 2011 23:47
Simple Script for Dive Calculation
// Namespace to DevelopLive
DevelopLive = window.DevelopLive || {};
// Define Dive
DevelopLive.Dive = window.DevelopLive.Dive || {};
(function () {
$self = DevelopLive.Dive;
$self.calcSac = function(psiIn, psiOut, time,
@mattkruskamp
mattkruskamp / dive.js
Created February 23, 2011 23:56
Calling the dive
// standard jquery self-calling function
jQuery(function () {
// get the elements
var psiIn = $("#psiIn"),
psiOut = $("#psiOut"),
time = $("#time"),
depth = $("#depth"),
tankVolume = $("#tankVolume"),
tankWorkingPsi = $("#tankWorkingPsi"),
finalLabel = $("#rate"),
@mattkruskamp
mattkruskamp / testservice.cs
Created March 8, 2011 23:07
WCF Rest Service
[ServiceContract]
[AspNetCompatibilityRequirements(
RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)]
public class TestService
{
[Description("Test Description.")]
[WebGet(UriTemplate = "go")]
public string Test()
{
@mattkruskamp
mattkruskamp / testservice2.cs
Created March 8, 2011 23:09
With the new constructor
IUserRepository userRepo;
public TestService(IUserRepository userRepo)
{
this.userRepo = userRepo;
}
@mattkruskamp
mattkruskamp / NinjectWebServiceHostFactory.cs
Created March 8, 2011 23:15
A web service host factory that utilizes the library.
public NinjectWebServiceHostFactory()
{
_kernel = NinjectKernel.Instance.Kernel; // point to your kernel
}