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()] | |
param ( | |
[Parameter(Mandatory=$true)] | |
[string] | |
$FilePath | |
) | |
$OutputBrotliFilePath = "$FilePath.br"; | |
$OutputGzipFilePath = "$FilePath.gz"; |
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
# make sure you're in the wwwroot folder of the published application | |
$JsFileContent = Get-Content -Path service-worker-assets.js -Raw | |
# remove JavaScript from contents so it can be interpreted as JSON | |
$Json = $JsFileContent.Replace("self.assetsManifest = ", "").Replace(";", "") | ConvertFrom-Json | |
# grab the assets JSON array | |
$Assets = $Json.assets | |
foreach ($Asset in $Assets) { | |
$OldHash = $Asset.hash | |
$Path = $Asset.url | |
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
{ | |
"profiles": | |
{ | |
"list": | |
[ | |
{ | |
"guid": "{e970efe0-4276-4895-b377-cfe4df8aa0e4}", | |
"hidden": false, | |
"name": "PowerShell Conda", | |
"icon": "%ALLUSERSPROFILE%\\Miniconda3\\Menu\\Iconleak-Atrous-PSConsole.ico", |
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
Function ConvertFrom-SecureString-AsPlainText{ | |
[CmdletBinding()] | |
param ( | |
[Parameter( | |
Mandatory = $true, | |
ValueFromPipeline = $true | |
)] | |
[System.Security.SecureString] | |
$SecureString | |
) |
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
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<appSettings> | |
<add key="SecurityProtocol.Remove" value="Ssl3,Tls" /> | |
<add key="SecurityProtocol.Add" value="Tls11,Tls12" /> | |
</appSettings> | |
</configuration> |
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
[ | |
{ | |
"img": "//upload.wikimedia.org/wikipedia/commons/thumb/d/d4/Flag_of_the_District_of_Columbia.svg/46px-Flag_of_the_District_of_Columbia.svg.png", | |
"code": "DC", | |
"name": "District of Columbia" | |
} | |
] |
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
Param( | |
[Parameter(Mandatory=$true)] | |
[String] | |
$ConnectionString, | |
[Parameter(Mandatory=$true)] | |
[String] | |
$EntityLogicalName, | |
[Parameter(Mandatory=$true)] | |
[String] | |
$OptionSetAttributeName |
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
<picture> | |
<source srcset="/media/bdpjq2s3/umbracologolarge.png?mode=pad&width=420" media="(max-width: 480px)" sizes="420px" /> | |
<source srcset="/media/bdpjq2s3/umbracologolarge.png?mode=pad&width=720" media="(max-width: 768px)" sizes="720px" /> | |
<source srcset="/media/bdpjq2s3/umbracologolarge.png?mode=pad&width=960" sizes="960px" /> | |
<img src="/media/bdpjq2s3/umbracologolarge.png" alt="Umbraco logo" /> | |
</picture> |
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
var options = new ChromeOptions(); | |
options.AddArgument("headless"); | |
using(var driver = new ChromeDriver(".", options)){ | |
} |
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
$LogFolder = "D:\home\site\wwwroot\App_Data\Logs"; | |
$DaysToKeepLogsAround = 30; | |
Get-ChildItem -Path $LogFolder -Recurse -File | Where LastWriteTime -lt (Get-Date).AddDays(-$DaysToKeepLogsAround) | Remove-Item -Force |