Skip to content

Instantly share code, notes, and snippets.

View SeidChr's full-sized avatar

Christian Seidlitz SeidChr

View GitHub Profile
using namespace System.Collections.Generic
using namespace System.Diagnostics
using namespace System.Threading
using namespace System.Management.Automation
function Wait-JobWithProgress {
[cmdletbinding()]
param(
[parameter(Mandatory, ValueFromPipeline)]
[object[]] $InputObject,
@quonic
quonic / DivoomPixoo64.ps1
Last active February 21, 2024 16:38
Function to control Divoom's Pixoo 64 over the network. This presumes that you have PowerShell 7 installed. Examples at the bottom of the file. Sometime the Pixoo will reboot when sending a command. No way to fix this at the moment.
#Requires -Version 7
# Current API documentation
# http://doc.divoom-gz.com/web/#/12?page_id=143
function Invoke-PlayGif {
[CmdletBinding()]
param(
[Parameter()]
[string]
@byt3bl33d3r
byt3bl33d3r / ws.ps1
Last active April 23, 2024 15:33
Async Websocket PowerShell client (producer/consumer pattern)
<#
References:
- https://docs.microsoft.com/en-us/dotnet/api/system.net.websockets.clientwebsocket?view=netframework-4.5
- https://github.com/poshbotio/PoshBot/blob/master/PoshBot/Implementations/Slack/SlackConnection.ps1
- https://www.leeholmes.com/blog/2018/09/05/producer-consumer-parallelism-in-powershell/
#>
$client_id = [System.GUID]::NewGuid()
$recv_queue = New-Object 'System.Collections.Concurrent.ConcurrentQueue[String]'
@Badgerati
Badgerati / GitHub_PSModule.ps1
Created October 2, 2019 21:14
Example script for publishing a PowerShell module to the NuGet GitHub Package Registry
<# --
Register the GitHub Package Registry
-- #>
$username = '<github-username>'
$token = '<github-personal-token>'
$sourceName = 'GitHub'
$source = "https://nuget.pkg.github.com/$username/index.json"
# add the github package registry as a nuget source
@urasandesu
urasandesu / Get-HelpByMarkdown.ps1
Last active August 5, 2023 04:12
This script converts PowerShell comment-based help to GitHub Flavored Markdown.
#
# File: Get-HelpByMarkdown.ps1
#
# Author: Akira Sugiura (urasandesu@gmail.com)
#
#
# Copyright (c) 2014 Akira Sugiura
#
# This software is MIT License.
#