Skip to content

Instantly share code, notes, and snippets.

Avatar

TechDufus matthewjdegarmo

View GitHub Profile
@matthewjdegarmo
matthewjdegarmo / Progress-Indicator-Example.ps1
Last active Apr 26, 2022
Display a spinner in the console to simulate scrip activity.
View Progress-Indicator-Example.ps1
#Region PREP
#Region Formatting
$script:YELLOW = "$($PSStyle.Foreground.Yellow)"
$script:RED = "$($PSStyle.Foreground.Red)"
$script:GREEN = "$($PSStyle.Foreground.Green)"
$script:CYAN = "$($PSStyle.Foreground.Cyan)"
$script:RESET = "$($PSStyle.Reset)"
$script:ARROW = "${CYAN}$([char]9654)${RESET}"
@matthewjdegarmo
matthewjdegarmo / Get-LVTCompoundInterest.ps1
Last active Dec 21, 2021
Basic LVT Profit Compound Calculator
View Get-LVTCompoundInterest.ps1
<#
.SYNOPSIS
Quickly calculate your compounding profits for LVT.
.DESCRIPTION
This function will show you an esitmate profit amount based on the values you provide.
This function currently does not get a live reading of the current LVT price, you will need to manually provide the current price yourself.
.PARAMETER LVT
Provide the amount of LVT in your portfolio that is generating interest.
.PARAMETER Days
Provide the number of days you are investing in LVT.
View github-metrics.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View keybase.md

Keybase proof

I hereby claim:

  • I am matthewjdegarmo on github.
  • I am matthewjdegarmo (https://keybase.io/matthewjdegarmo) on keybase.
  • I have a public key ASBTbx9XQCyLoRAf7g2Jw2k2J0HihGOj-SfpmmEBU3PDiAo

To claim this, I am signing this object:

@matthewjdegarmo
matthewjdegarmo / Get-WhereObject.ps1
Last active Apr 7, 2021
Dynamically Generate Where-Object from [PSCustomObject] Values
View Get-WhereObject.ps1
Function Get-Example {
[CmdletBinding()]
param(
[parameter()]
[System.String] $FirstName,
[parameter()]
[System.String]$LastName
)
@matthewjdegarmo
matthewjdegarmo / Test-PowerShellProfilePerformance.ps1
Last active Sep 5, 2022
Test PowerShell Profile Performance
View Test-PowerShellProfilePerformance.ps1
<#
.SYNOPSIS
Perform a benchtest of your PowerShell profile.
.DESCRIPTION
Load Powershell (or Preview) X number of times with NO profile, and with profile, and compare the average loading times.
.PARAMETER Count
Specify the number of consoles to load for testing.
.PARAMETER Preview
Specify whether to test again pwsh-preview or not.
With this present, the tests will use pwsh-preview.
@matthewjdegarmo
matthewjdegarmo / New-ModuleBase.ps1
Last active Aug 3, 2020
Create the base module structure for a new module. This is my slight adaptation to Jeff Hick's [original code](https://gist.github.com/jdhitsolutions/6d26c983a13efae93363e0f9a9e2996b) presented at the Chicago PowerShell Conference 2020.
View New-ModuleBase.ps1
#requires -version 5.1
#requires -module PowerShellGet
<#
The function assumes you have git installed and use it for source control
This code contains hard-coded references for my environment. This file
is offered as educational and reference material. It will not run for you
without revision.