PowerShell modules, digital signatures, NuGet nuspec and packages
d-fens GmbH General-Guisan-Strasse 6 CH-6300 Zug Switzerland
#!/bin/bash | |
# Variables | |
DATE=$(date +"%Y%m%d%H") | |
DEFAULT_KEEP=24 # Default number of snapshots to keep | |
DEFAULT_RETAIN_DAYS=7 # Default days to keep LVM archive files | |
DRY_RUN=false | |
QUIET=false | |
KEEP=$DEFAULT_KEEP | |
RETAIN_DAYS=$DEFAULT_RETAIN_DAYS |
<#PSScriptInfo | |
.VERSION 1.0.0 | |
.GUID 380c73f8-ef67-4aeb-ae6b-2f5e563fabb8 | |
.AUTHOR Julian Pawlowski | |
.COMPANYNAME Julian Pawlowski | |
.COPYRIGHT © 2024 Julian Pawlowski | |
.TAGS | |
.LICENSEURI https://opensource.org/license/MIT | |
.PROJECTURI https://gist.github.com/jpawlowski/d9e7cb61a36a4a22a69a935657e77335 | |
.ICONURI |
<#PSScriptInfo | |
.VERSION 1.0.0 | |
.GUID d24ad04e-2bbc-4087-a8b3-9da63d79edc4 | |
.AUTHOR Julian Pawlowski | |
.COMPANYNAME Julian Pawlowski | |
.COPYRIGHT © 2024 Julian Pawlowski | |
.TAGS | |
.LICENSEURI https://opensource.org/license/MIT | |
.PROJECTURI https://gist.github.com/jpawlowski/07d0ad578d50027c962c63228fd5c1a6 | |
.ICONURI |
<#PSScriptInfo | |
.VERSION 1.0.0 | |
.GUID fa3a4d56-2d51-465c-b6f7-6c8518b51e2f | |
.AUTHOR Julian Pawlowski | |
.COMPANYNAME Julian Pawlowski | |
.COPYRIGHT © 2024 Julian Pawlowski | |
.TAGS | |
.LICENSEURI https://opensource.org/license/MIT | |
.PROJECTURI https://gist.github.com/jpawlowski/7d4f2e76851349800e1cf86ff00ca43c | |
.ICONURI |
<#PSScriptInfo | |
.VERSION 1.1.0 | |
.GUID a17ec91c-0f75-42ab-b4ef-8766c1a25fca | |
.AUTHOR Julian Pawlowski | |
.COMPANYNAME Julian Pawlowski | |
.COPYRIGHT © 2024 Julian Pawlowski | |
.TAGS | |
.LICENSEURI https://opensource.org/license/MIT | |
.PROJECTURI https://gist.github.com/jpawlowski/ca1bde7e979f367e8007b056bc032b6e | |
.ICONURI |
class SemanticVersionExtended { | |
<# | |
.SYNOPSIS | |
Represents a Semantic Version (SemVer). | |
.LINK | |
https://gist.github.com/jpawlowski/1c81fff8a55f5e368d831e60e235893c | |
#> | |
[int]$Major | |
[int]$Minor |
#!/bin/sh | |
NAME='John Doe' | |
EMAIL='jdo@example.com' | |
export GNUPGHOME="$(mktemp -d)" | |
cat >$TMPDIR/gpg-gen.tmpl <<EOF | |
%echo Generating an OpenPGP key | |
Key-Type: eddsa | |
Key-Curve: ed25519 |
#Requires -Version 7 | |
# Version 1.2.10 | |
# check if newer version | |
$gistUrl = "https://api.github.com/gists/a208d2bd924691bae7ec7904cab0bd8e" | |
$latestVersionFile = [System.IO.Path]::Combine("$HOME",'.latest_profile_version') | |
$versionRegEx = "# Version (?<version>\d+\.\d+\.\d+)" | |
if ([System.IO.File]::Exists($latestVersionFile)) { |
<# | |
.SYNOPSIS | |
Dynamic Multi-Platform PowerShell Profile Loader | |
.DESCRIPTION | |
Safe this script named 'profile.ps1' in either $PROFILE.AllUsersAllHosts or | |
$PROFILE.CurrentUserAllHosts. | |
(see: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_profiles#the-profile-variable) | |
It will automatically create a directory structure for every PS host | |
application, platform and PowerShell edition you use and replicate itself as |