Skip to content

Instantly share code, notes, and snippets.

using System;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Net.Configuration;
using System.Net.Mail;
using System.Text;
using System.Web;
using System;
using System.Collections.Generic;
using System.Dynamic;
public class TurboObject : DynamicObject
{
private readonly object _defaultValue;
private readonly Dictionary<string, object> _vals = new Dictionary<string, object>();
public TurboObject()
namespace RockPaperAzure
{
using System;
using System.Collections.Generic;
using System.Linq;
using RockPaperScissorsPro;
public class MyBot : IRockPaperScissorsBot
{
private readonly List<Move> _opponentMoves;
@rushfrisby
rushfrisby / REST API Contract Spec.js
Last active August 29, 2015 14:02
REST API Contract Spec
{
BasePath: "http://www.domain.com/", //the url of your application's root
Version: 1.0,
Types: [{ //includes custom types and not built-in types like "string". Generics supported.
Name: "NameOfType",
Properties: [{
"NameOfProperty": "TypeOfProperty"
}]
}],
Methods: [{
<#@ template language="C#" debug="true" hostspecific="True" #>
<#@ output extension=".cs"#>
<#@ assembly name="System.Core" #>
<#@ assembly name="System.Data" #>
<#@ import namespace="System" #>
<#@ import namespace="System.Data" #>
<#@ import namespace="System.Data.SqlClient" #>
<#@ import namespace="System.IO" #>
<#@ import namespace="System.Text" #>
<#@ import namespace="System.Text.RegularExpressions" #>
@rushfrisby
rushfrisby / FilterCriteria.cs
Created July 2, 2014 17:04
FilterCriteria used for paging
public class FilterCriteria
{
public int Skip { get; set; }
public int Take { get; set; }
}
@rushfrisby
rushfrisby / PagedResultSet.cs
Created July 2, 2014 17:06
PagedResultSet used for paging
public class PagedResultSet<T>
{
private int _endRecord;
private int _startRecord;
public PagedResultSet()
{
PageResults = new List<T>();
TotalRecords = 0;
StartRecord = 0;
@rushfrisby
rushfrisby / arraytests.js
Created August 2, 2014 06:49
JavaScript Array Tests
var ret = [], tmp, num = 500, i = 1024;
for ( var j1 = 0; j1 < i * 15; j1++ ) {
ret = [];
ret.length = i;
}
for ( var j2 = 0; j2 < i * 10; j2++ ) {
ret = new Array(i);
}
using System;
using System.Diagnostics;
namespace JsEnginePerformanceComparison
{
class Program
{
static void Main()
{
var done = false;
@rushfrisby
rushfrisby / pclbreakage.cs
Created August 3, 2014 15:49
PCL breaks in roslyn
using AutoMapper;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using System;
using System.IO;
using System.Text;
namespace PclBreakage
{
class Program