Skip to content

Instantly share code, notes, and snippets.

@Buildstarted
Buildstarted / HomeController.cs
Created November 17, 2011 16:21 — forked from Antaris/HomeController.cs
An updated model binder that supports async and non-async file uploads.
namespace AsyncUpload.Controllers
{
public class HomeController : Controller
{
public ActionResult Index()
{
ViewBag.Message = "Welcome to ASP.NET MVC!";
return View();
}
@Buildstarted
Buildstarted / FindConflictingReferences.cs
Created June 14, 2012 22:29 — forked from brianlow/FindConflictingReferences.cs
Find conflicting assembly references
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using NUnit.Framework;
namespace MyProject
{
[TestFixture]
@Buildstarted
Buildstarted / gist:3182600
Created July 26, 2012 15:06 — forked from davidfowl/gist:3172990
MethodInfo.Invoke is slow...
using System;
using System.Diagnostics;
using System.Linq.Expressions;
using System.Reflection;
namespace ConsoleApplication3
{
class Program
{
static void Main(string[] args)
@Buildstarted
Buildstarted / uri.js
Created January 30, 2013 01:50 — forked from jlong/uri.js
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
function stringFormat (formatString)
{
var builder = [];
var st = 0;
var j = 0;
for (var i = 0; i < formatString.length; i++)
{
switch (st)
using System;
using System.Reflection;
using CommonDomain;
using CommonDomain.Core;
using CommonDomain.Persistence;
using CommonDomain.Persistence.EventStore;
using EventStore;
using EventStore.Dispatcher;
using System;
using System.Reflection;
using CommonDomain;
using CommonDomain.Core;
using CommonDomain.Persistence;
using CommonDomain.Persistence.EventStore;
using EventStore;
using EventStore.Dispatcher;
// POST api/values
[HttpPost]
[ActionName("Complex")]
public HttpResponseMessage PostComplex(TwoField twoField)
{
List<string> list = new List<string>();
var name = "undefined";
if(ModelState.IsValid && twoField != null)
using System;
namespace NumberCrazy
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Number(1) == 1: {0}", new Number(1) == 1);
Console.WriteLine("Number(2) > 1: {0}", new Number(2) > 1);
@Buildstarted
Buildstarted / netcore linecount
Last active January 21, 2020 15:04 — forked from aarondandy/netcore linecount
netcore 3.1. hardcoded to the location of a 1.6gb text file
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
using System;
using System.IO;
using System.Text;
namespace BensWordCounter
{
public class Program
{