Skip to content

Instantly share code, notes, and snippets.

View analogrelay's full-sized avatar
💖

Ashley Stanton-Nurse analogrelay

💖
View GitHub Profile
@analogrelay
analogrelay / Sleepsort.cs
Created June 16, 2011 21:59
Sleepsort for C#!
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) {
int Count(Folder f) {
int count = 0;
foreach(Item i in f) {
if(i is File) {
count++;
} else {
count += Count((Folder)i);
}
}
return count;
@analogrelay
analogrelay / Product.cs
Created December 19, 2011 22:15
Mocking internal interfaces
// Product Code
internal interface IFoo
{
void Bar();
void Baz();
}
@analogrelay
analogrelay / reccos.md
Created March 18, 2012 04:15
Recommendations for Razor Room
  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
public void Foo() {
}
@analogrelay
analogrelay / IConsole.cs
Created May 18, 2012 21:51
BadImageFormatException - The signature is incorrect
public interface IConsole {
void WriteLine(string line);
}
@analogrelay
analogrelay / PatchedWebViewPage.cs
Created November 8, 2012 02:09
Patched WebViewPage base class
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
@analogrelay
analogrelay / PatchedWebViewPage.cs
Created November 8, 2012 02:12
Patched WebViewPage base class
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
@analogrelay
analogrelay / BlobScanner.cs
Created November 30, 2012 02:41
Blob Scanner
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
{
@analogrelay
analogrelay / Program.cs
Last active December 13, 2015 23:29
Curious about Lambdas vs Method Groups...
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Curious
{
class Program