Skip to content

Instantly share code, notes, and snippets.

View imorrish's full-sized avatar

Ian Morrish imorrish

View GitHub Profile
@crazy-max
crazy-max / Caddy.env
Last active May 13, 2024 17:45
Proxmox web interface through Caddy as reverse proxy with Let's Encrypt
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_HOSTED_ZONE_ID=
@adamdriscoll
adamdriscoll / waxon.ps1
Created February 16, 2018 02:31
Real time updates using Set-UDElement and Get-UDElement
$dashboard = New-UDDashboard -Title "PowerShell Universal Dashboard" -Content {
New-UDRow -Columns {
New-UDColumn -Size 1 {
New-UDElement -Tag "input" -Attributes @{
type = "button"
value = "Click me!"
onClick = {
$Element = Get-UDElement -Id "textbox"
if ($Element.Content[0] -eq "Wax on") {
Set-UDElement -Id "textbox" -Content {
@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
@JamesRandall
JamesRandall / RedirectNewtonsoftJson.ps1
Last active May 2, 2023 13:39
Powershell binding redirection
# Load your target version of the assembly
$newtonsoft = [System.Reflection.Assembly]::LoadFrom("$PSScriptRoot\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll")
$onAssemblyResolveEventHandler = [System.ResolveEventHandler] {
param($sender, $e)
# You can make this condition more or less version specific as suits your requirements
if ($e.Name.StartsWith("Newtonsoft.Json")) {
return $newtonsoft
}
foreach($assembly in [System.AppDomain]::CurrentDomain.GetAssemblies()) {
if ($assembly.FullName -eq $e.Name) {