Skip to content

Instantly share code, notes, and snippets.

View heaths's full-sized avatar

Heath Stewart heaths

View GitHub Profile
@heaths
heaths / settings.json
Last active June 2, 2024 00:34
VSCode configuration
{
"editor.fontFamily": "Fira Code, Hack, Consolas, monospace",
"editor.fontLigatures": true,
"editor.fontSize": 12,
"editor.renderControlCharacters": false,
"editor.renderWhitespace": "all",
"diffEditor.ignoreTrimWhitespace": false,
"terminal.external.windowsExec": "C:\\Program Files\\PowerShell\\7\\pwsh.exe",
"terminal.integrated.shell.windows": "C:\\Program Files\\PowerShell\\7\\pwsh.exe",
"terminal.integrated.shellArgs.windows": [

Keybase proof

I hereby claim:

  • I am heaths on github.
  • I am heaths (https://keybase.io/heaths) on keybase.
  • I have a public key whose fingerprint is 2BBE FFB8 9070 A92F A199 3955 6730 9B05 E115 44FB

To claim this, I am signing this object:

<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>Enumeration-style Structure</Title>
<Keywords>
<Keyword>enum</Keyword>
</Keywords>
<Shortcut>enumStruct</Shortcut>
</Header>
@heaths
heaths / Uninstall-DotnetSuperseded.ps1
Created May 17, 2019 20:42
Uninstall superseded .NET Core SDKs that should no longer be needed
#Requires -Version 4.0
#Requires -RunAsAdministrator
[CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact='Medium')]
param (
[Parameter()]
[switch] $Force
)
$yesToAll = $false
@heaths
heaths / Get-ServiceClient.ps1
Created December 11, 2018 01:25
Detects processes using services and optionally stops those processes.
#Requires -Version 3
# The MIT License (MIT)
# Copyright (C) Microsoft Corporation. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
@heaths
heaths / New-DurableGuid.Tests.ps1
Created January 27, 2018 17:36
How to generate a durable GUID
<#
Copyright 2018 Heath Stewart
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
@heaths
heaths / Traversal.targets
Created October 6, 2017 17:01
Example MSBuild Traversal
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
<PropertyGroup>
<BuildInParallel Condition="'$(BuildInParallel)' == ''">true</BuildInParallel>
</PropertyGroup>
<ItemDefinitionGroup>
<Project>
<AdditionalPropeties />
<BuildInParallel>$(BuildInParallel)</BuildInParallel>
@heaths
heaths / Docker.md
Last active June 2, 2024 00:34
Tips and other useful commands for docker

To remove all stopped containers:

docker ps --filter "status=exited" --format "{{.ID}}" | foreach { docker rm $_ }
@heaths
heaths / LICENSE.txt
Last active December 22, 2019 12:20
Fix Visual Studio package cache issues
The MIT License (MIT)
Copyright (C) Microsoft Corporation. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
@heaths
heaths / .gitattributes
Last active June 2, 2024 00:35
Simple PowerShell module for VSTS
* text=auto