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
# This scripts create an IIS site with an SSL Certificate assigned to it | |
$siteName = 'sitename' | |
$sitepath = 'path to project' | |
Write-Host "Starting Site Creation for $siteName" | |
# Create Certificate | |
New-SelfSignedCertificate -Type SSLServerAuthentication -DnsName $siteName -CertStoreLocation 'cert:\LocalMachine\My' -KeyExportPolicy Exportable -KeyAlgorithm RSA -KeyLength 4096 | |
New-WebAppPool -Name $siteName |
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
$root = gci "cert:\CurrentUser\my\d8c5cd7502cd699783d9b2c031636ca48ae4229f" | |
$rootSubject = $root.Subject.Substring(3) | |
Write-Host "Root Certificate" $root.Thumbprint | |
$certName = "myCustomCert" | |
$cert = New-SelfSignedCertificate ` | |
-CertStoreLocation cert:\CurrentUser\my ` |
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
#!/bin/bash | |
set -e | |
# Simple script to remove dangling images from GHCR. | |
# You need to have installed gh cli and jq for this script to work properly | |
# You need to be logged to 'gh' first | |
container="debian/buildd" | |
temp_file="ghcr_prune.ids" | |
rm -rf $temp_file |
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
using namespace System.Management.Automation | |
using namespace System.Management.Automation.Language | |
if ($host.Name -eq 'ConsoleHost') | |
{ | |
Import-Module PSReadLine | |
} | |
#Import-Module PSColors | |
#Import-Module posh-git | |
Import-Module -Name Terminal-Icons |
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
PS1='\[\033]0;$TITLEPREFIX:\W\007\]' # set window title | |
PS1="$PS1"'\n' # new line | |
PS1="$PS1"'\[\033[32m\]' # change to green | |
PS1="$PS1"'git@local ' # user@host<space> | |
PS1="$PS1"'\[\033[35m\]' # change to purple | |
PS1="$PS1"'$MSYSTEM ' # show MSYSTEM | |
PS1="$PS1"'\[\033[33m\]' # change to brownish yellow | |
PS1="$PS1"'\W' # current working directory | |
if test -z "$WINELOADERNOEXEC" | |
then |
Create CA file
$c = New-SelfSignedCertificate -DnsName SelfSignedCA -CertStoreLocation Cert:\CurrentUser\My -NotAfter (Get-Date).AddYears(10)
check certificate fingerprint
$c
New-SelfSignedCertificate -DnsName "KnowYourToolset Cert Authority" -CertStoreLocation "Cert:\LocalMachine\My" -KeyUsage CertSign,CRLSign
Creates root authority with permission to sign stuff
Export-Certificate -Cert Cert:\LocalMachine\My\<CERTHUMB> -FilePath kytroot.cer
Import-Certificate -FilePath .\kytroot.cer -CertStoreLocation Cert:\LocalMachine\Root
NewerOlder