Skip to content

Instantly share code, notes, and snippets.

View davidwhitney's full-sized avatar
🍸
You're all wonderful. That's what's happening.

David Whitney davidwhitney

🍸
You're all wonderful. That's what's happening.
View GitHub Profile
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
using NUnit.Framework;
namespace ClassLibrary1
using System;
using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
namespace triangle
{
public class Pascal
{
public static string GenerateNicely(int maxDepth)
@davidwhitney
davidwhitney / RetryAndTests.cs
Created April 14, 2015 12:41
Retry example
using System;
using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
namespace ClassLibrary1
{
[TestFixture]
public class Class1
{
@davidwhitney
davidwhitney / PassengerExample.cs
Last active August 29, 2015 14:18
Passenger webdriver example
[TestFixture]
public class PassengerExample
{
private PassengerConfiguration _testConfig;
private PageObjectTestContext<AmazonHomepage> _ctx;
[SetUp]
public void Setup()
{
@davidwhitney
davidwhitney / AmazonWebDriverExample-Bad.cs
Created April 1, 2015 15:32
Horrible web driver code
[TestFixture]
public class AmazonWebDriverExample
{
private RemoteWebDriver _selenim;
[SetUp]
public void Setup()
{
_selenim = new PhantomJSDriver();
}
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/CodeEditing/Intellisense/CodeCompletion/IntelliSenseCompletingCharacters/CSharpCompletingCharacters/UpgradedFromVSSettings/@EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/ExcludedFiles/FileMasksToSkip/=_002A_002Emin_002Ejs/@EntryIndexedValue">True</s:Boolean>
<s:String x:Key="/Default/CodeStyle/CodeCleanup/RecentlyUsedProfile/@EntryValue">Default: Full Cleanup</s:String>
<s:Boolean x:Key="/Default/CodeStyle/Generate/=Implementations/@KeyIndexDefined">True</s:Boolean>
<s:String x:Key="/Default/CodeStyle/Generate/=Implementations/Options/=PropertyBody/@EntryIndexedValue">Default body (from options)</s:String>
<s:Boolean x:Key="/Default/Environment/ExternalSources/FirstTimeFormShown/
@davidwhitney
davidwhitney / gist:9bdaea45a1ac2f71ee12
Created March 30, 2015 13:15
DEATH TO ALL FALSE COMMENTS
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using NUnit.Framework;
namespace rostest
{
[TestFixture]
public class Class1
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using NUnit.Framework;
namespace RubberDucky
{
@davidwhitney
davidwhitney / gist:e96f6fc5659975252be0
Created January 14, 2015 10:06
Manipulate app compatibility flags
using System;
using System.Configuration.Abstractions;
using System.IO;
using log4net;
using Microsoft.Win32;
namespace Doco.Conversion
{
public class BackwardsCompatabilityPatchForWindowsServer : IBackwardsCompatabilityPatchForWindowsServer
{
@davidwhitney
davidwhitney / gist:7679f8490d9a31794a12
Created December 29, 2014 11:12
Deployments in .NET 2014
RespondentID,CollectorID,StartDate,EndDate,IP Address,Email Address,First Name,LastName,Custom Data,"Broadly, where do you host your software?","What do you use for deployments of your .NET software today?",,,,,,,,,,,,,,,,,,,,,,,"My hosting environment is...","Would you recommend the deployment tech you use?","Comments?"
3630646923,60665721,12/05/2014 22:32:35,12/05/2014 22:33:30,"66.87.143.234","","","","","On Prem with Virtualisation",,"Octopus Deploy",,,,,,,,,"NuGet",,,"Atlassian Bamboo",,,,,,,,,,"Multiple self managed servers in a cluster","With reservations",
3629777943,60665721,12/05/2014 16:05:24,12/05/2014 16:06:30,"83.251.67.247","","","","","Microsoft Azure","MSDeploy",,,,,,,"Azure Websites Deployments / Project Kudu",,,,"TeamCity and Scripting",,,,,"AppHarbor Git Deploy",,,,,,,"A load balanced web farm","Yes",
3629682724,60665721,12/05/2014 15:28:25,12/05/2014 15:29:18,"88.168.236.26","","","","","Dedicated VPS","MSDeploy",,,"Chef",,,,,,,"NuGet",,,,,,,,,,,,,"A load balanced web farm","With reserv