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
<# | |
.SYNOPSIS | |
Creates and displays a Windows Toast notification | |
.DESCRIPTION | |
Creates a Windows Toast notification and displays it to the user | |
.PARAMETER AppId | |
The AppId of the application that will display the notification |
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
function Format-Text { | |
<# | |
.SYNOPSIS | |
Writes text with color and formatting | |
.DESCRIPTION | |
Writes text with color, formatting and RGB support | |
.INPUTS | |
This function accepts pipeline input. |
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
function Show-WebRequestDownloadJobState { | |
<# | |
.SYNOPSIS | |
Display a simple animation while waiting for a download job to complete. | |
.DESCRIPTION | |
Waits for a download job to complete, displaying a | |
progress bar while it is running. When the download is complete, the | |
function will write a completion message to the console. | |
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
function Measure-UserBandwidth { | |
<# | |
.SYNOPSIS | |
Measures the user's Internet bandwidth. | |
.DESCRIPTION | |
Measures internet bandwidth using the Ookla Speedtest CLI, which is a command-line interface to the Speedtest.net website. | |
The function will download the CLI from the internet if necessary. | |
.PARAMETER Type |
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
function Invoke-URLInDefaultBrowser | |
{ | |
<# | |
.SYNOPSIS | |
Cmdlet to open a URL in the User's default browser. | |
.DESCRIPTION | |
Cmdlet to open a URL in the User's default browser. | |
.PARAMETER URL | |
Specify the URL to be Opened. | |
.EXAMPLE |
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 assembly System.Windows.Forms | |
using namespace System.Windows.Forms | |
using namespace System.Drawing | |
#Enable visual styles | |
[Application]::EnableVisualStyles() | |
#Enable DPI awareness | |
$code = @" | |
[System.Runtime.InteropServices.DllImport("user32.dll")] |
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
function Get-FileFromWeb { | |
param ( | |
# Parameter help description | |
[Parameter(Mandatory)] | |
[string]$URL, | |
# Parameter help description | |
[Parameter(Mandatory)] | |
[string]$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
# extracted from: https://bun.sh/install | |
# https://github.com/oven-sh/bun | |
# Reset | |
Color_Off='' | |
# Regular Colors | |
Red='' | |
Green='' | |
Dim='' # White |
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
<p align="center"> | |
<picture> | |
<source srcset="https://cdn.example.com/logo-light.svg" media="(prefers-color-scheme: light)" height="96px" alt="logo light"> | |
<img src="https://cdn.example.com/logo-dark.svg" height="96px" alt="logo dark"> | |
</picture> | |
</p> |
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
<# :# PowerShell comment protecting the Batch section | |
@echo off | |
:# Disabling argument expansion avoids issues with ! in arguments. | |
setlocal EnableExtensions DisableDelayedExpansion | |
:# Prepare the batch arguments, so that PowerShell parses them correctly | |
set ARGS=%* | |
if defined ARGS set ARGS=%ARGS:"=\"% | |
if defined ARGS set ARGS=%ARGS:'=''% |