Skip to content

Instantly share code, notes, and snippets.

View mwallner's full-sized avatar
🧙

Manfred Wallner mwallner

🧙
View GitHub Profile
@heiswayi
heiswayi / SerialPortReader.ps1
Last active November 3, 2022 15:02
PowerShell Script - Serial Port Reader
<#
.SYNOPSIS
Listens to and read data from a serial port (e.g. COM port)
.DESCRIPTION
The purpose of this script is to keep listening and read data from a serial port.
All the data captured will be displayed and log into a file.
.EXAMPLE
./SerialPortReader.ps1
.EXAMPLE
./SerialPortReader.ps1 -PortName COM3 -BaudRate 9600
@alexbevi
alexbevi / Execute-With-Retry.ps1
Created February 6, 2015 15:28
A PowerShell cmdlet that can be used to retry a failing ScriptBlock
<#
This function can be used to pass a ScriptBlock (closure) to be executed and returned.
The operation retried a few times on failure, and if the maximum threshold is surpassed, the operation fails completely.
Params:
Command - The ScriptBlock to be executed
RetryDelay - Number (in seconds) to wait between retries
(default: 5)
MaxRetries - Number of times to retry before accepting failure
@flcdrg
flcdrg / boxstarter-bare-v3.ps1
Last active March 25, 2024 01:47
My BoxStarter Scripts
# 1. Install Chocolatey
<#
Set-ExecutionPolicy RemoteSigned -Force
# Create empty profile (so profile-integration scripts have something to append to)
if (-not (Test-Path $PROFILE)) {
$directory = [IO.Path]::GetDirectoryName($PROFILE)
if (-not (Test-Path $directory)) {
New-Item -ItemType Directory $directory | Out-Null
}