This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function clean-branches([Switch]$d = $false) { | |
if (-not $d) { | |
Write-Host "Dry-Run, would delete:" | |
} | |
git branch -vv | where {$_ -match '\[origin/.*: gone\]'} | foreach { | |
$branch = $_.split(" ", [StringSplitOptions]'RemoveEmptyEntries')[0] | |
if ($d) { | |
git branch -D ($branch) | |
} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$datetime = Get-Date; $dt = $datetime.ToUniversalTime().ToString('yyyy-MM-dd HH:mm:ss'); | |
docker run --net=host --ipc=host --uts=host --pid=host --security-opt=seccomp=unconfined --privileged --rm alpine date -s $dt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class UmbracoStandardOwinStartup : UmbracoDefaultOwinStartup | |
{ | |
private readonly static string clientId = ConfigurationManager.AppSettings["ida:ClientId"]; | |
private readonly static string aadInstance = ConfigurationManager.AppSettings["ida:AADInstance"]; | |
private readonly static string tenantId = ConfigurationManager.AppSettings["ida:TenantId"]; | |
private readonly static string authority = aadInstance + tenantId; | |
private readonly static string loginUrl = ConfigurationManager.AppSettings["ida:PostLoginUrl"]; | |
public override void Configuration(IAppBuilder app) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class UmbracoADAuthExtensions | |
{ | |
/// <summary> | |
/// Configure ActiveDirectory sign-in | |
/// </summary> | |
/// <param name="app"></param> | |
/// <param name="tenant"></param> | |
/// <param name="clientId"></param> | |
/// <param name="postLoginRedirectUri"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<add key="ida:ClientId" value="" /> | |
<add key="ida:AADInstance" value="https://login.microsoftonline.com/" /> | |
<add key="ida:Domain" value="xxxxx.onmicrosoft.com" /> | |
<add key="ida:TenantId" value="" /> | |
<add key="ida:PostLoginUrl" value="https://localhost:44383/umbraco"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.Owin; | |
using Microsoft.Owin.FileSystems; | |
using Owin; | |
using Umbraco.Web; | |
public class Startup : UmbracoDefaultOwinStartup | |
{ | |
public override void Configuration(IAppBuilder app) | |
{ | |
app.Map("/.well-known", letsEncrypt => |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param($websiteName, $packOutput) | |
$website = Get-AzureWebsite -Name $websiteName | |
# Debug dump the enabled hostnames on the site to check it has an scm | |
Write-Host "Enabled Host Names" | |
foreach($hostname in $website.EnabledHostNames) | |
{ | |
Write-Host "$hostname`n" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<parameters> | |
<parameter name="ApplicationName" description="Please enter the Application Name" defaultvalue="" tags=""> | |
<parameterentry kind="XmlFile" scope="\\web.config$" match="/configuration/appSettings/add[@key='ApplicationName']/@value"> | |
</parameterentry> | |
</parameter> | |
</parameters> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Security.Claims; | |
using System.Threading.Tasks; | |
using Microsoft.AspNet.Builder; | |
using Microsoft.AspNet.Http; | |
using Microsoft.Framework.Runtime; | |
using RollbarSharp; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Security.Claims; | |
using System.Threading.Tasks; | |
using Microsoft.AspNet.Builder; | |
using Microsoft.AspNet.Http; | |
using Microsoft.Framework.Runtime; | |
using RollbarSharp; |
NewerOlder