Skip to content

Instantly share code, notes, and snippets.

Andrew Stanton-Nurse anurse

Block or report user

Report or block anurse

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@anurse
anurse / Sleepsort.cs
Created Jun 16, 2011
Sleepsort for C#!
View Sleepsort.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;
namespace ConsoleApplication2 {
class Program {
static void Main(string[] args) {
View gist:1340667
int Count(Folder f) {
int count = 0;
foreach(Item i in f) {
if(i is File) {
count++;
} else {
count += Count((Folder)i);
}
}
return count;
@anurse
anurse / Product.cs
Created Dec 19, 2011
Mocking internal interfaces
View Product.cs
// Product Code
internal interface IFoo
{
void Bar();
void Baz();
}
@anurse
anurse / reccos.md
Created Mar 18, 2012
Recommendations for Razor Room
View reccos.md
  1. People from the team try to hang out here, but there's no guarantee they'll see your question. For more persistent discussion, ask on ASP.Net forums or StackOverflow and add a link to the chat room
  2. Room owners are team members! They know what's up!
  3. The more code you can give us, the better chance we'll have of figuring out your problem.
  4. Other questions? Having trouble getting someone to see a question you're asking? Tweet @anurse
View file.cs
public void Foo() {
}
@anurse
anurse / IConsole.cs
Created May 18, 2012
BadImageFormatException - The signature is incorrect
View IConsole.cs
public interface IConsole {
void WriteLine(string line);
}
@anurse
anurse / PatchedWebViewPage.cs
Created Nov 8, 2012
Patched WebViewPage base class
View PatchedWebViewPage.cs
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.WebPages;
using System.Web.WebPages.Instrumentation;
namespace MvcApplication1.Patches
@anurse
anurse / PatchedWebViewPage.cs
Created Nov 8, 2012
Patched WebViewPage base class
View PatchedWebViewPage.cs
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.WebPages;
using System.Web.WebPages.Instrumentation;
namespace MvcApplication1.Patches
View BlobScanner.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Blob;
namespace BlobScanner
{
@anurse
anurse / Program.cs
Last active Dec 13, 2015
Curious about Lambdas vs Method Groups...
View Program.cs
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Curious
{
class Program
You can’t perform that action at this time.