Skip to content

Instantly share code, notes, and snippets.

View andyedinborough's full-sized avatar

Andy Edinborough andyedinborough

View GitHub Profile
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Remoting_Test {
class Program {
static void Main(string[] args) {
AE.Remoting.Settings.Current.RemotingHost = "localhost";
@andyedinborough
andyedinborough / Memberwise-Clone-Example.cs
Created April 26, 2010 14:13
Let you do a memberwise clone on a object of a base-type to an object of it's parent-type
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
namespace ConsoleApplication1 {
public class a {
public string testa { get; set; }
public virtual string Who() {
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
namespace ConsoleApplication1 {
public class Student {
public string Name { get; set; }
}

in your html

site.less .opacity { opacity: 0.5 }

 .corners {

border-radius: 3px;

//lifted from http://imgscalr.com/public/scripts/main.js
(function (window, document, $, tracky) {
var isEventSupported = (function () {
var TAGNAMES = {
'select': 'input',
'change': 'input',
'submit': 'form',
'reset': 'form',
'error': 'img',
'load': 'img',
@andyedinborough
andyedinborough / RazorCompiler.cs
Created June 9, 2011 14:04
Update for Mvc Mini Profiler's RazorCompiler.cs
using System;
using System.CodeDom;
using System.CodeDom.Compiler;
using System.Collections.Concurrent;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Web;
using System.Web.Razor;
public class MvcApplication : System.Web.HttpApplication {
void Application_Start() {
MvcMiniProfiler.Data.ProfiledDbProviderFactory.RegisterProviders();
}
}
@andyedinborough
andyedinborough / LICENSE.txt
Created December 28, 2011 15:07 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@andyedinborough
andyedinborough / rx.js
Created January 22, 2012 16:49
One RegExp to match urls, email addresses, Twitter usernames and hashtags.
function combine() {
var ret = '', flags = '';
[ ].forEach.call(arguments, function (exp) {
exp = exp.toString();
if (exp[0] !== '/') {
flags = exp;
} else {
ret += exp.substr(1, exp.length - 2);
}
@andyedinborough
andyedinborough / IntegrationTest.cs
Created February 23, 2012 14:29
This would be so epic...
using System;
using System.Web;
namespace TestOfMyDreams {
[TestClass]
public class Test {
[TestMethod]
public void TestRequest(){
using(var app = MyMvcApplication.Create("C:\\path\\to\\project\\"))