Skip to content

Instantly share code, notes, and snippets.

View mwjcomputing's full-sized avatar

Matthew Johnson mwjcomputing

View GitHub Profile
@mwjcomputing
mwjcomputing / DaysTilLConverge2020.ps1
Created September 26, 2019 17:51
A simple PowerShell script to calculate days until Converge 2020.
# ==================================================
# = FileName: daysTillConverge2020.ps1
# = Author: Matt Johnson (@mwjcomputing)
# = Description: Calculates days until Converge 2020
# ==================================================
# Set start of Converge 2020 date and time
$ConvergeDate = Get-Date -Year 2020 -Month 5 -Day 14 -Hour 8 -Minute 0
# Get current date and time
$Today = Get-Date

Keybase proof

I hereby claim:

  • I am mwjcomputing on github.
  • I am mwjcomputing (https://keybase.io/mwjcomputing) on keybase.
  • I have a public key ASDjbB9syjr0bJDeZecBVrhgEp4X90o9cJzEBq-UA5UuNgo

To claim this, I am signing this object:

@mwjcomputing
mwjcomputing / Set-WindowsTheme.ps1
Last active December 3, 2021 14:54
Sets the Windows 11 theme between Dark and Light.
function Set-WindowsTheme {
param (
[ValidateSet("light","dark")]
[Parameter(Mandatory=$true)]
[string] $Mode
)
if ('dark' -eq $Mode) {
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name AppsUseLightTheme -Value 0 -Type Dword -Force
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name SystemUsesLightTheme -Value 0 -Type Dword -Force
@mwjcomputing
mwjcomputing / New-MTail.ps1
Created January 28, 2022 18:39
New PowerShell Tail
function New-MTail {
param (
[Parameter(Mandatory = $true)]
[string]$File,
[Parameter(Mandatory = $true)]
[string]$SearchTerm
)
Get-Content -Path $File -tail 100 -wait | Select-String $SearchTerm
@mwjcomputing
mwjcomputing / Get-PublicIP.ps1
Created January 28, 2022 19:08
Get a host's public IP
function Get-PublicIP {
param (
[Parameter(HelpMessage='Return IPv6 info if available.')]
[switch] $ipV6
)
if ($ipV6)
{
$ipifyURL = 'https://api64.ipify.org'
}