Skip to content

Instantly share code, notes, and snippets.

View evoelker's full-sized avatar

Eryk evoelker

  • In a rabbit hole.
View GitHub Profile
@evoelker
evoelker / Start-Progress.ps1
Last active February 17, 2022 14:55 — forked from ctigeek/Start-Sleep.ps1
Powershell sleep function, with progress bar.
function Sleep-Progress($seconds)
{
<#
.SYNOPSIS
Function to Start-Sleep with a progress bar
.DESCRIPTION
Runs the 'Start-Sleep' command using the with a progress bar. Time is passed to the function in seconds as an argument.
.NOTES
# Function to write to the log file
function Write-Log
{
<#
.SYNOPSIS
Function to write formatted information to the log file.
.DESCRIPTION
Function takes provided message and severity level (1,2,3), formats the message and writes it to the log file. The message parameter is required.
If a severity level other than 1 is needed, specify it as the second parameter.
# EOL converter
function convertEOL
{
<#
.SYNOPSIS
Function to convert Windows EOL to Unix EOL format.
.DESCRIPTION
Takes EOL format and file as input and converts the entire file to provided EOL format.
# Function to send email
function sendMail
{
<#
.SYNOPSIS
Function to send email to supplied email address.
.DESCRIPTION
Function takes the provided email address, subject and message, formates an email and sends it to the configured SMTP server.
The subject line is optional.
# Function to hash any string passed to it - Provide text to hash as parameter
function stringHash
{
<#
.SYNOPSIS
Function to hash any string passed to it.
.DESCRIPTION
Provide text you would like to generate a hash value for as an argument and the function will return an SHA256 hash of the text.
@evoelker
evoelker / settings.json
Last active August 17, 2020 23:44
Windows Terminal Settings
// This file was initially generated by Windows Terminal 1.1.2233.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",