Skip to content

Instantly share code, notes, and snippets.

View mwwhited's full-sized avatar

Matthew Whited mwwhited

View GitHub Profile
@mwwhited
mwwhited / run-sonar.bat
Last active February 2, 2024 22:57
Local SonarQube
SET SONARQUBE_KEY=XXX
SET SONARQUBE_TOKEN=YYY
dotnet tool restore
echo "Git fetch"
git fetch --prune
FOR /F "tokens=* USEBACKQ" %%g IN (`dotnet gitversion /output json /showvariable FullSemVer`) DO (SET BUILD_VERSION=%%g)
if "%BUILD_VERSION%"=="" GOTO error
@mwwhited
mwwhited / Directory.Build.props
Last active February 2, 2024 22:51
Custom build extensions for .Net
<Project>
<PropertyGroup Condition="'$(SolutionDir)' == ''">
<!-- Resolve solution dir if not set -->
<SolutionDir Condition="'$(SolutionDir)' == '' and $([System.IO.Directory]::GetFiles('../', '*.sln').get_Length()) != 0">../</SolutionDir>
<SolutionDir Condition="'$(SolutionDir)' == '' and $([System.IO.Directory]::GetFiles('../../', '*.sln').get_Length()) != 0">../../</SolutionDir>
<SolutionDir Condition="'$(SolutionDir)' == '' and $([System.IO.Directory]::GetFiles('../../../', '*.sln').get_Length()) != 0">../../../</SolutionDir>
<SolutionDir Condition="'$(SolutionDir)' == '' and $([System.IO.Directory]::GetFiles('../../../../', '*.sln').get_Length()) != 0">../../../../</SolutionDir>
<SolutionDir Condition="'$(SolutionDir)' == '' and $([System.IO.Directory]::GetFiles('../../../../../', '*.sln').get_Length()) != 0">../../../../../</SolutionDir>
<SolutionDir Condition="'$(SolutionDir)' != ''">$([System.IO.Path]::GetFullPath('$(SolutionDir)'))</SolutionDir>
@mwwhited
mwwhited / .gitconfig
Created February 1, 2024 18:12
.gitconfig for beyond compare 4
[credential "https://source.developers.google.com"]
useHttpPath = true
[user]
name = Matthew Whited
email = matt@whited.us
[core]
excludesfile =
[difftool "sourcetree"]
cmd = '' \"$LOCAL\" \"$REMOTE\"
[mergetool "sourcetree"]
@mwwhited
mwwhited / .wslconfig
Last active February 1, 2024 01:19
Preferred Settings for WSL2
# %USERPROFILE%\.wslconfig
# https://learn.microsoft.com/en-us/windows/wsl/wsl-config
[wsl2]
# If the value is mirrored then this turns on mirrored networking mode. Default or unrecognized strings result in NAT networking.
networkingMode=mirrored
# Only applicable when experimental.networkingMode is set to mirrored. When set to True, will allow the Container to connect to
# the Host, or the Host to connect to the Container, by an IP address that's assigned to the Host. Note that the 127.0.0.1
# loopback address can always be used - this option allows for all additionally assigned local IP addresses to be used as well.
@mwwhited
mwwhited / .editorconfig
Created January 28, 2024 03:31
My favorite csharp .editorconfig settings
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/code-style-rule-options
###############################
# Core EditorConfig Options #
###############################
root = true
# All files
[*]
indent_style = space
@mwwhited
mwwhited / RadexOneReverseEngineerNotes.md
Created November 20, 2020 13:07
Radex One protocol reverse engineering notes.

Radex One - USB Serial Trace

Summary

Notes from reverse engineering serial protocol used by Radex One from Quarta

Notes

○ Examples
@mwwhited
mwwhited / VersionSqlProj.md
Last active September 18, 2023 19:25
Add versioning to SQL Server Projects

Add versioning to SQL Server Projects

Summary

This is a basic set of instructions on how to add version number support for SQL Server projects and databases. This will will add the version number as an extended property on the deployed database.

How to access version number

DECLARE @SchemaName SYSNAME = 'Core_DocumentManagement';
SELECT
--'entity "' + schemas.name + '.' + tables.name + '" as ' + tables.name + ' {' + CHAR(10) +
'entity ' + tables.name + ' {' + CHAR(10) +
(SELECT
STRING_AGG(
' ' + columns.name + ' : ' + UPPER(types.name) +
ISNULL(CASE
WHEN types.name IN ('varchar', 'nvarchar', 'char', 'nchar')
@mwwhited
mwwhited / Xilinx Native FIFO.md
Last active March 30, 2023 21:30
Xilinx Native FIFO

XILINX FIFO Generator - Native Interface

Summary

The intent of this documnent is to describe the state flow of a XILINX Native FIFO with Independent Clocks

Configuration

  • Native Interface
  • Independent Clocks

Create Network Backup for HomeSeer

Summary

This is a simplified set of instructions to mount a network share that can be used to backup HS4-pi

Details

  1. Create NFS share on desired server.
  2. log into the terminal on HS4 and mount the NFS share