This document now exists on the official ASP.NET core docs page.
- Application
- Request Handling
$user = 'user' | |
$pass = 'pass' | |
$uri = '<url>' | |
$pair = "$($user):$($pass)" | |
$encodedCreds = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes($pair)) | |
$basicAuthValue = "Basic $encodedCreds" |
This document now exists on the official ASP.NET core docs page.
To create the code signing certificate using PowerShell (using Administrator prompt):
$cert = New-SelfSignedCertificate -Subject "My Certificate" -Type CodeSigning -CertStoreLocation Cert:\CurrentUser\My -NotAfter (Get-Date).AddYears(100)
To export the certificate from the certificate store:
$certPassword = ConvertTo-SecureString -String "passwordhere" -Force –AsPlainText
$cert | Export-PfxCertificate -FilePath "mycert.pfx" -Password $certPassword
Every now and then I need to create a self signed certificate in azure for something. In my particular case its Azure B2C. I am using a mac so its not simply just running something like
New-SelfSignedCertificate `
-KeyExportPolicy Exportable `
-Subject "CN=yourappname.yourtenant.onmicrosoft.com" `
-KeyAlgorithm RSA `
cinst beyondcompare | |
cinst beyondcompare-integration |
// create CA key | |
openssl genrsa -out ca.key 2048 | |
// create CA cert | |
openssl req -x509 -sha256 -new -nodes -key ca.key -days 365 -out ca.pem | |
// create client key | |
openssl genrsa -out client.key 2048 | |
// create client csr |
az configure --defaults location=westus2 | |
# resourceSuffix=$RANDOM | |
# webName="java-container-cicd-${resourceSuffix}" | |
# registryName="javacontainercicd${resourceSuffix}" | |
# dbServerName="java-container-cicd-${resourceSuffix}" | |
# rgName='java-containers-cicd-rg' | |
# planName='java-container-cicd-asp' | |
# az group create --name $rgName |
choco feature enable -n allowGlobalConfirmation | |
cinst Chocolatey | |
cinst azcopy | |
cinst azure-cli | |
cinst azurepowershell | |
cinst sql-server-express | |
cinst sql-server-management-studio | |
cinst powerbi | |
cinst sqlsentryplanexplorer | |
cinst curl |
# Invoke using following syntax into IE: | |
# http://boxstarter.org/package/url?https://gist.githubusercontent.com/lucamilan/7b3f1c53ea66f943c6899777fd7baf55/raw/b7167b7bc0a573944b3b4324538c9762babe0b1a/ml2021-boxstarter.ps1 | |
try { | |
# Boxstarter options | |
$Boxstarter.RebootOk = $true | |
$Boxstarter.NoPassword = $false # Is this a machine with no logon password? | |
$Boxstarter.AutoLogin = $true | |
# --- TEMPORARILY DISABLE --- # |
using System.Collections.Generic; | |
namespace StronglyTypedPipelines | |
{ | |
public class LoopStep<INPUT,OUTPUT> : IPipelineStep<IEnumerable<INPUT>, IEnumerable<OUTPUT>> | |
{ | |
private IPipelineStep<INPUT, OUTPUT> _internalStep; | |
public LoopStep(IPipelineStep<INPUT, OUTPUT> internalStep) |