Skip to content

Instantly share code, notes, and snippets.

View billkindle's full-sized avatar
🏠
Works from home and likes it that way.

Bill Kindle billkindle

🏠
Works from home and likes it that way.
View GitHub Profile
@billkindle
billkindle / Get-ErrorTypes.ps1
Last active July 13, 2019 15:07
This PowerShell code will return all currently loaded .NET error types. Usefull for Try / Catch / Finally blocks.
# Courtesy of https://www.sconstantinou.com/powershell-try-catch-finally/
# A great PowerShell blogger, Stephanos Constantinou
([appdomain]::CurrentDomain.GetAssemblies() |
Where-Object {$_.Location -ne $null} |
foreach {$_.GetExportedTypes() |
Where-Object {$_.Fullname -match 'Exception'}}).FullName
# Any URL you want to test
$url = 'https://www.google.com'
# This will gather everything but that's OK
$http = (Invoke-WebRequest -Uri $url)
# I'm using the $http object membertype property to get the status code
Write-Output $http.StatusCode
@billkindle
billkindle / Declaration_of_Independence.txt
Created June 30, 2020 15:12
Declaration of Independence
When, in the course of human events, it becomes necessary for one people to dissolve the political bands which have connected them with another, and to assume, among the powers of the earth, the separate and equal station to which the laws of nature and of nature’s God entitle them, a decent respect to the opinions of mankind requires that they should declare the causes which impel them to the separation.
We hold these truths to be self-evident, that all men are created equal, that they are endowed by their Creator with certain unalienable rights, that among these are life, liberty, and the pursuit of happiness. That, to secure these rights, governments are instituted among men, deriving their just powers from the consent of the governed. That, whenever any form of government becomes destructive of these ends, it is the right of the people to alter or to abolish it, and to institute new government, laying its foundation on such principles, and organizing its powers in such form, as to them shall seem most li
@billkindle
billkindle / Do-SearchStringUntil.ps1
Created July 20, 2020 15:59
Just a little PowerShell Do-Until loop I used for searching an active log file.
do {
# set variables for searching Service.log
$now = Get-Date -Format 'yyyy-MM-dd'
$log = 'C:\Users\wkindle\Desktop\Service_Test.log'
$logstr = 'updating status to READY'
Write-Output "Searching for READY status"
# using this to create a timeout counter
{
"meta": {
"theme": "macchiato",
"lastModified": "2025-04-26T03:08:12.458Z",
"version": "v1.0.0",
"canonical": "https://github.com/jsonresume/resume-schema/blob/v1.0.0/schema.json"
},
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"basics": {
"name": "Bill Kindle",