Skip to content

Instantly share code, notes, and snippets.

@runesoerensen
runesoerensen / RequireHttpsAttribute.cs
Created April 12, 2011 16:40
RequireHttpsAttribute using X-Forwarded-Proto header
using System;
using System.Web.Mvc;
using RequireHttpsAttributeBase = System.Web.Mvc.RequireHttpsAttribute;
namespace AppHarbor.Web
{
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, Inherited = true,
AllowMultiple = false)]
public class RequireHttpsAttribute : RequireHttpsAttributeBase
{
@praeclarum
praeclarum / NSRunLoopScheduler.cs
Created July 22, 2011 22:40
A TaskScheduler for MonoTouch to sync with the UI thread
using System;
using System.Collections.Generic;
using System.Linq;
using MonoTouch.Foundation;
namespace System.Threading.Tasks
{
public class UIKitScheduler : NSRunLoopScheduler
{
protected override void QueueAction (NSAction action)
@samnaseri
samnaseri / PaymentController.cs
Created March 27, 2012 00:58
Payment Controller for MIGS gateway using Asp.Net MVC4
// WARNING : THIS CODE IS AS IS. NOTHING IS GUARANTEED.
// PLEASE NOTE THAT THIS IS ONLY A TEMPLATE, YOU NEED TO WORK ON IT TO MAKE IT SUITABLE FOR YOUR NEEDS
// AT LEAST YOU NEED TO REPLACE THE VALUE FOR HASH SECRET VARIABLES BY VALUES YOU RECEIVED FROM YOUR BANK
// For more information go to : http://samondotnet.blogspot.com/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;