Skip to content

Instantly share code, notes, and snippets.

View ntotten's full-sized avatar

Nathan Totten ntotten

View GitHub Profile
@ntotten
ntotten / Checklist.md
Last active August 29, 2015 14:13
Auth0 Github Project Checklist

Github Checklist

The standard requirements for any github project on github.com/auth0.

  • Must have README.md
  • Must have LICENSE file - generally MIT
  • Must have .gitignore file: https://github.com/github/gitignore
  • Must have a metadata.json file if it is a Sample, SDK, Tutorial, or Demo
  • Must have a /examples folder with at least one example showing how to use the project (except samples)
  • Must have description field of github project set with meaningful description of project
  • Should have url field of github project set
function(ticket, event, callback) {
if (event.entity === 'ticket' && event.name === 'created' && !ticket.status) {
if (ticket.tags.indexOf('priority-support') ||
ticket.tags.indexOf('standard-support') ||
ticket.tags.indexOf('enterprise-support') ||
ticket.tags.indexOf('priority-sales') {
ticket.status = 'normal';
}
}
}
CanvasUrlBuilder urlBuilder = new CanvasUrlBuilder(httpContext.Request, canvasSettings);
var url = urlBuilder.GetLoginUrl(this.FacebookApp, Perms, ReturnUrlPath, CancelUrlPath);
public void Application_Start()
{
FacebookContext.SetApplication(new RequestScopedFacebookApplication());
}
private class RequestScopedFacebookApplication : IFacebookApplication
{
private IFacebookApplication Current
<system.webServer>
<httpProtocol>
<customHeaders>
<clear />
<add name="X-UA-Compatible" value="IE=9; chrome=1" />
</customHeaders>
</httpProtocol>
</system.webServer>
@ntotten
ntotten / Global.asax.cs
Created February 10, 2011 16:59
Multi-Tenant Facebook Application
public class MvcApplication : System.Web.HttpApplication
{
protected void Application_Start()
{
// Register your multi-tenant application on app startup
FacebookApplication.SetApplication(new MultiTenantFacebookApplication());
}
}
namespace System.Web.Mvc {
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Runtime.CompilerServices;
using System.Text;
using System.Web;
using System.Web.WebPages.Html;
using Microsoft.Internal.Web.Utils;
namespace System.Web.Mvc {
using System.Runtime.CompilerServices;
[TypeForwardedFrom("System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35")]
public enum TagRenderMode {
Normal,
StartTag,
EndTag,
SelfClosing
}
[Export]
[PartCreationPolicy(CreationPolicy.NonShared)]
public class AccountController : Controller
{
const string appId = "188070564565375";
const string appSecret = "<app_secret>";
// **************************************
// URL: /Account/LogOn
public class CachedLocationService : LocationService
{
private static List<StoreLocation> locations;
private static DateTime expireTime = DateTime.UtcNow;
private static object syncLock = new object();
public CachedLocationService(DataModelContainer dataModelContainer)
: base(dataModelContainer) { }
public override StoreLocation GetByStoreNumber(int storeNumber)