This file contains 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
const fs = require('fs/promises') | |
const path = require('path') | |
//const util = require('util') | |
const sanitize = require("sanitize-filename") | |
const HTMLParser = require('node-html-parser') | |
const TurndownService = require('turndown') | |
const TurndownPluginGfmService = require('@guyplusplus/turndown-plugin-gfm') | |
const TurndownPluginConfluenceToGfmService = require('turndown-plugin-confluence-to-gfm') |
This file contains 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
# Based on | |
# https://gist.github.com/jessfraz/7c319b046daa101a4aaef937a20ff41f | |
# https://gist.github.com/NickCraver/7ebf9efbfd0c3eab72e9 | |
#--- Uninstall unnecessary applications that come with Windows out of the box --- | |
# Microsoft | |
Get-AppxPackage Microsoft.3DBuilder | Remove-AppxPackage | |
Get-AppxPackage Microsoft.BingFinance | Remove-AppxPackage |
This file contains 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
[CmdletBinding(SupportsShouldProcess)] | |
param ( | |
# Only one of these may be used. | |
[Parameter(ParameterSetName='Major')] | |
[switch]$Major, | |
[Parameter(ParameterSetName='Minor')] | |
[switch]$Minor, | |
[Parameter(ParameterSetName='Patch')] | |
[switch]$Patch, | |
[Parameter(ParameterSetName='Version')] |
This file contains 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 FeatureFolderViewLocationExpander : IViewLocationExpander | |
{ | |
public void PopulateValues(ViewLocationExpanderContext context) | |
{ | |
/* no-op */ | |
} | |
public IEnumerable<string> ExpandViewLocations(ViewLocationExpanderContext context, IEnumerable<string> viewLocations) | |
{ | |
// {0} - Action Name |
This file contains 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 IServiceProvider ConfigureServices(IServiceCollection services) | |
{ | |
// Configure regular ASP.NET Core services | |
services.AddMvc(); | |
// ... | |
// Send configuration to Castle Windsor | |
Container.Populate(services); | |
Container.BeginScope(); | |
return Container.Resolve<IServiceProvider>(); |
This file contains 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
$ErrorActionPreference = "Stop" | |
# Parameters | |
$baseFolder = (Get-Item (Get-Location)).Parent.FullName + "\" | |
$slnName = "All.sln" | |
$excludePatterns = @("Some\Exclusion") | |
# ################################################################ |
This file contains 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 HomeController : Controller | |
{ | |
private readonly IAppCookies _cookies; | |
public HomeController(IAppCookies cookies) | |
{ | |
_cookies = cookies; | |
} | |
public ActionResult Index() |
This file contains 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 interface IAppCookies | |
{ | |
string UserEmail { get; set; } | |
DateTime? LastVisit { get; set; } | |
} | |
public class AppCookies : IAppCookies | |
{ | |
private readonly ICookieContainer _cookieContainer; |
This file contains 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 Mocks | |
{ | |
public static Mock<HttpRequestBase> HttpRequest() | |
{ | |
var httpRequest = new Mock<HttpRequestBase>(); | |
httpRequest.Setup(x => x.Cookies).Returns(new HttpCookieCollection()); | |
return httpRequest; | |
} | |
public static Mock<HttpResponseBase> HttpResponse() |
NewerOlder