Skip to content

Instantly share code, notes, and snippets.

View kevinobee's full-sized avatar

Kevin Obee kevinobee

  • Canterbury, UK
  • 02:28 (UTC +01:00)
View GitHub Profile
/// <reference path="../jquery-1.7.2-vsdoc.js" />
/// <reference path="../jquery-ui-1.8.20.js" />
/// <reference path="../knockout-2.1.0.debug.js" />
/// <reference path="../knockout.mapping-latest.debug.js" />
/// <reference path="../bootstrap-modal.js" />
/// <reference path="../moment.js" />
var mi = mi || {};
$(document).ready(function () {
<!doctype html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
<script>
function testcase() {
var img = new Array();
using System;
using System.Web.Mvc;
using System.Web.Routing;
namespace Mvc.Website
{
public class MvcApplication : Sitecore.Web.Application
{
public static void RegisterRoutes(RouteCollection routes)
{
@kevinobee
kevinobee / sc_cmdlet_list.ps1
Created November 28, 2012 14:29
Sitecore powershell console list of CmdLets
Get-Command | where { ($_.ImplementingType.Assembly -ne $null) -and ($_.ImplementingType.Assembly.GetName().Name.StartsWith("Cognifide.PowerShell")) }
@kevinobee
kevinobee / GetDataController.cs
Created November 28, 2012 08:47
Multiple GET methods with WebApi
using System.Net.Http;
using System.Web.Http;
namespace MvcApplication1.Controllers
{
public class GetDataController : ApiController
{
public string Get()
{
return Request.RequestUri.Host;
@kevinobee
kevinobee / SimpleEventAggregator.cs
Created October 22, 2012 12:29
SimpleEventAggregator
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
namespace Mvc.Infrastructure.Sitecore.Events
{
public class SimpleEventAggregator : IEventAggregator
{
private readonly Dictionary<Type, List<WeakReference>> _eventSubscriberLists =
using System;
using Mvc.Infrastructure;
using Mvc.Infrastructure.Sitecore.Events;
namespace Mvc.Website.layouts.Event_Sublayouts
{
public partial class Sample_Event_Consumer : System.Web.UI.UserControl, ISubscriber<FooHappened>
{
// private EventHandler m_handler;
using System;
namespace @abstract // learnt something here, how to handle a reserved word as a namespace, obviously a similar thing
{
class Program
{
static void Main(string[] args)
{
var session = new Session();
var builder = new DetailsViewModelBuilder();