Skip to content

Instantly share code, notes, and snippets.

View robertmclaws's full-sized avatar

Robert McLaws robertmclaws

View GitHub Profile
@robertmclaws
robertmclaws / Auth0.cs
Created February 15, 2015 03:48
Auth0 Rule Models
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace AdvancedREI.Project.Areas.External.Models
{
[DataContract]
public class Identity
{
@robertmclaws
robertmclaws / Auth0LockUtilities.js
Created April 5, 2015 20:04
How to use Auth0 Lock with .NET
function signin(returnUrl?: string, targetId?: string, showChrome: boolean = true) {
//RWM: We declare a new version every time because the old one gets disposed.
var lock = new Auth0Lock(auth0ClientId, auth0Domain);
lock.showSignin({
callbackURL: window.location.origin + "/signin-auth0",
authParams: {
state: returnUrl !== "" ? "ru=" + returnUrl : null,
scope: "openid profile"
},
container: targetId,
@robertmclaws
robertmclaws / kendo.bootstrap-integrated.less
Created April 9, 2015 15:04
Simpler way to integrate Kendo and Bootstrap
/*
* Kendo UI Complete v2013.1.529 (http://kendoui.com)
* Copyright 2013 Telerik AD. All rights reserved.
*
* Kendo UI Complete commercial licenses may be obtained at
* https://www.kendoui.com/purchase/license-agreement/kendo-ui-complete-commercial.aspx
* If you do not own a commercial license, this file shall be governed by the trial license terms.
*/
@import "../Bootstrap/variables.less";
@robertmclaws
robertmclaws / PackagesUpgrader.cs
Last active August 20, 2017 02:08
Upgrades packages.config to VS2017's PackageReferences
// ===========================================
// Kill Packages.config With 🔥🔥🔥
// Prototype by Robert McLaws (@robertmclaws)
// Last Updated 19 Aug 2017
// ===========================================
//RWM: Set these to your specific project.
var projectFolder = @"D:\GitHub\SomeCoolApp\src\SomeProject";
var projectFile = @"SomeProject.csproj";
@robertmclaws
robertmclaws / BindingRedirectFixer.cs
Created August 20, 2017 16:50
Sorts AssemblyBindingRedirects and Removes Duplicates
// ===========================================
// Fix AssemblyBindingRedirects
// Prototype by Robert McLaws (@robertmclaws)
// Last Updated 20 Aug 2017
// ===========================================
//RWM: Set these to your specific project.
var projectFolder = @"D:\GitHub\SomeSolution\src\SomeProject";
const string configFile = "app.config";
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup Label="Globals">
<SccProjectName>SAK</SccProjectName>
<SccProvider>SAK</SccProvider>
<SccAuxPath>SAK</SccAuxPath>
<SccLocalPath>SAK</SccLocalPath>
<Configurations>Debug;Release;WEB-DEV;WEB-PROD</Configurations>
</PropertyGroup>