Skip to content

Instantly share code, notes, and snippets.

Avatar

Eryk evoelker

  • In a rabbit hole.
View GitHub Profile
@evoelker
evoelker / settings.json
Last active Aug 17, 2020
Windows Terminal Settings
View settings.json
// 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",
View stringHash.ps1
# 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.
View sendMail.ps1
# 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.
View convertEOL.ps1
# 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.
View Write-Log.ps1
# 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.
@evoelker
evoelker / Start-Progress.ps1
Last active Sep 13, 2018 — forked from ctigeek/Start-Sleep.ps1
Powershell sleep function, with progress bar.
View Start-Progress.ps1
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