Skip to content

Instantly share code, notes, and snippets.

View javafun's full-sized avatar

Vincent javafun

View GitHub Profile
@akshaysura
akshaysura / HabitatSolutionScript.ps1
Created January 21, 2017 23:34
Create a Sitecore Helix solution from scratch using PowerShell
#paths to the project templates on your system
$global:classTemplate = "D:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\ProjectTemplatesCache\CSharp\Windows Root\Windows\1033\ClassLibrary\csClassLibrary.vstemplate"
$global:webTemplate = "D:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\ProjectTemplatesCache\CSharp\Web\1033\WebApplicationProject40\EmptyWebApplicationProject40.vstemplate"
#variable used to store the path for the empty Habitat folder
$global:helixPath =""
#empty variable used to store the solution name
$global:solutionName = ""
@mackuba
mackuba / macbook-pro-2016.md
Created January 18, 2017 03:06
MacBook Pro 2016 - an iOS developer's review

MacBook Pro 2016 - an iOS developer's review

Here are some thoughts about my new MacBook Pro that I've been using for the last few weeks (the Santa Claus from DHL brought it to me just before Christmas), hopefully this will help someone who's considering getting one.

Note: this is written from the perspective of a person who switched to the MBP from a 2015 13" MacBook Air (i7) and also has a 2012 21" iMac. Your experiences will obviously be different if you have e.g. a fairly recent 15" Retina MacBook Pro.

Specs

  • MacBook Pro 15", late 2016
  • Core i7 2.9 GHz (4 cores)
@nzpcmad
nzpcmad / AssignOAuth2SecurityRequirements.cs
Last active June 27, 2017 12:54
Using Swagger for Implicit Grant on Azure AD
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Swashbuckle;
using Swashbuckle.Swagger;
using System.Web.Http.Description;
namespace TodoListService
@nzpcmad
nzpcmad / gist:66b2da0aa7bbdb61650ed6930b943413
Last active June 8, 2021 18:53
Postman : Resource Owner Password Grant on Server 2016 - ADFS 4.0
{
"variables": [],
"info": {
"name": "ADFS Public Resource Owner",
"_postman_id": "7dd4d5e3-fa83-6977-5b71-5571e8fce9f6",
"description": "",
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
},
"item": [
{
@nzpcmad
nzpcmad / gist:2f274f5ca2d93a6f37e06ef610259db2
Created November 8, 2016 19:12
Postman : Authorisation Code Grant on Server 2016 - ADFS 4.0 - with template web API
{
"variables": [],
"info": {
"name": "ADFS My IIS",
"_postman_id": "f2145f47-b93d-b35a-5707-c115e866bf2b",
"description": "Auth code flow.",
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
},
"item": [
{
@nzpcmad
nzpcmad / ADFS Public.postman_collection_confidential.json
Created September 1, 2016 20:35
Postman collection for confidential cleint via ADFS 4.0 and OpenID Connect / OAuth 2.0
{
"variables": [],
"info": {
"name": "ADFS Public - Confidential",
"_postman_id": "4c0d0604-58e6-35b6-50bc-51c69d779f39",
"description": "Confidential code flow.",
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
},
"item": [
{
@kamsar
kamsar / ServiceCollectionExtensions.cs
Last active January 12, 2020 14:24
Automatically register controllers with Sitecore 8.2 IoC container
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Text.RegularExpressions;
using System.Web.Mvc;
using Microsoft.Extensions.DependencyInjection;
@nzpcmad
nzpcmad / ADFS.postman_collection - Public.json
Last active June 27, 2022 23:03
Postman collection to get userinfo via ADFS 4.0 and OpenID Connect / OAuth 2.0
{
"variables": [],
"info": {
"name": "ADFS Public",
"_postman_id": "3d8a90ce-eb38-fedf-8bfe-b75578dd0810",
"description": "Auth code flow.",
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
},
"item": [
{
@joseftw
joseftw / DependencyResolverInitialization.cs
Last active July 26, 2019 11:56
Support for "injecting" AllowedTypes in EPiServer when ContentTypes doesn't know about each other. Raw
using System.Web.Mvc;
using EPiServer.DataAbstraction.RuntimeModel;
using EPiServer.Framework;
using EPiServer.Framework.Initialization;
using EPiServer.ServiceLocation;
using ModularAllowedTypes.Business.Rendering;
using EPiServer.Web.Mvc;
using EPiServer.Web.Mvc.Html;
using StructureMap;
@javafun
javafun / Install Solr.ps1
Last active May 13, 2018 08:59 — forked from kamsar/Install Solr.ps1
Sitecore Solr Cannon
# This script will set up (and install if needed) Apache Solr for a Sitecore instance.
# This does NOT configure Sitecore to use Solr,
# just the Solr server and cores for Sitecore to connect to once it is set up to use Solr.
# So, what does it do?
#
# * Installs SOLR, if needed, from the Bitnami SOLR stack: https://bitnami.com/stack/solr/installer
# * Creates a SOLR config set for the cores to share (shared schema)
# * Creates SOLR cores for all Sitecore indexes, including secondary cores to support online reindexing (Switch on Rebuild)