Skip to content

Instantly share code, notes, and snippets.

View dougwaldron's full-sized avatar

Doug Waldron dougwaldron

View GitHub Profile
@dougwaldron
dougwaldron / .NET Framework version.md
Created May 16, 2023 13:44
Check which version of the .NET Framework is installed

Check .NET Framework version from PowerShell

Get-ItemPropertyValue -LiteralPath 'HKLM:SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full' -Name Release

Compare the above result to this table.

@dougwaldron
dougwaldron / Windows-Power.ps1
Created March 22, 2023 12:51
PowerShell commands to show when the computer last turned off and then on
# Last time system was turned off
Get-WinEvent -MaxEvents 3 -FilterHashTable @{ProviderName='Microsoft-Windows-Kernel-Power';LogName='System'}
# Last time system was turned on
Get-WinEvent -MaxEvents 1 -FilterHashTable @{ProviderName='Microsoft-Windows-Power-Troubleshooter';LogName='System'}
@dougwaldron
dougwaldron / Microsoft.PowerShell_profile.ps1
Last active November 18, 2022 15:04
Windows Terminal settings
# Load omp theme
oh-my-posh init pwsh --config 'https://gist.githubusercontent.com/dougwaldron/8a84062beb55414d99bcdd5240e4f447/raw/32c1e20ab792340716d4fdcf4da6dc5527c794c3/doug.omp.json' | Invoke-Expression
# How to load one of the default themes instead:
# oh-my-posh --init --shell pwsh --config "$env:POSH_THEMES_PATH\powerlevel10k_lean.omp.json" | Invoke-Expression
# Load terminal icons
# Adds 900 ms to PWSH startup time!
# Import-Module -Name Terminal-Icons
@dougwaldron
dougwaldron / InstallSoftware.ps1
Last active March 21, 2024 04:12
Install software with winget / automate installation with PowerShell
# 1. Make sure the Microsoft App Installer is installed:
# https://www.microsoft.com/en-us/p/app-installer/9nblggh4nns1
# 2. Edit the list of apps to install.
# 3. Run this script as administrator.
Write-Output "Installing Apps"
$apps = @(
@{name = "7zip.7zip" },
@{name = "Adobe.Acrobat.Reader.64-bit" },
@{name = "Axosoft.GitKraken" },
@dougwaldron
dougwaldron / 1-Application-quality.md
Created January 19, 2022 21:19
Application quality notes

Application Quality Goals

Overall application quality goes beyond implementing features and includes:

  • Accessibility
  • Usability
  • Performance
  • Security
  • Reliability
  • Maintainability
@dougwaldron
dougwaldron / last-shutdown.bat
Created November 4, 2021 12:55
Show details of last shutdown
wevtutil qe system "/q:*[System [(EventID=1074)]]" /rd:true /f:text /c:1
@dougwaldron
dougwaldron / raygun-deployment.yml
Last active May 3, 2022 12:35
GitHub action to automatically add a new deployment to Raygun's deployment tracking tools based on tags
# Workflow to register a new application deployment with Raygun.
# The workflow is triggered when a tag with the specified prefix is pushed to
# GitHub. The tag should be formatted as a prefix followed by the version
# number. For example: "prod/1.0.0"
#
# To use this workflow, you must:
#
# 1. Make sure the tag prefix is set correctly below. The default is "prod/".
#
@dougwaldron
dougwaldron / RDP-keyboard-shortcuts.md
Created March 11, 2021 20:21
Remote Desktop keyboard shortcuts
Remote Desktop shortcut Description
Alt + Home Start Menu
Alt + Page Up Alt + Tab switcher
Alt + Page Down Shift + Alt + Tab switcher
Alt + Insert Cycle through open apps
Alt + Delete Open the window menu of the active window
Ctrl + Alt + End Ctrl + Alt + Del
Ctrl + Alt + Break Toggle between full screen mode and windowed
Ctrl + Alt + Home Activate connection bar in full-screen mode
@dougwaldron
dougwaldron / SQL Server job history.sql
Last active February 1, 2023 20:43
Analyzing SQL Server agent job history
USE msdb
GO
-- List info on all failed SQL Server agent jobs
select j.name as JobName,
h.step_name as StepName,
CONVERT(char(10), CAST(STR(h.run_date, 8, 0) AS datetime), 111) as RunDate,
STUFF(STUFF(RIGHT('000000' + CAST(h.run_time AS varchar(6)), 6), 5, 0, ':'), 3, 0, ':') as RunTime,
h.run_duration as StepDuration,
@dougwaldron
dougwaldron / Oracle-to-SQL-Server.md
Created May 19, 2020 13:58
Oracle to SQL Server Migration Plan

Oracle to SQL Server Migration Plan

Documentation

  • Business processes
  • Codebase
  • Database
  • Data flows

Infrastructure