Skip to content

Instantly share code, notes, and snippets.

View mwwhited's full-sized avatar

Matthew Whited mwwhited

View GitHub Profile

ASP.Net Core Middleware Check

Summary

This uses reflection to evaluate the registered middleware pipeline fpr ASP.Net Core.

    //Stage
    var config = new ConfigurationBuilder()
        .AddJsonStream(this.GetResourceStream("appsettings.json"))

Revert System Versioned tables

ALTER TABLE dbo.your_table
	DROP CONSTRAINT DF_SysStart , DF_SysEnd 
ALTER TABLE dbo.your_table
	DROP PERIOD FOR SYSTEM_TIME
ALTER TABLE dbo.your_table
	DROP COLUMN [SysStartTime], [SysEndTime]
@mwwhited
mwwhited / .gitignore
Created January 12, 2021 16:17
Vivado .gitignore
#########################################################################################################
## This is an example .gitignore file for Vivado, please treat it as an example as
## it might not be complete. In addition, XAPP 1165 should be followed.
#########################################################################################################
#########
#Exclude all
#########
*
!*/
!.gitignore
@mwwhited
mwwhited / DbPublish.xml
Created January 12, 2021 18:42
Example DACPAC Publish Profile
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TargetDatabaseName>YourDatabase</TargetDatabaseName>
<DeployScriptFileName>YourFileName.sql</DeployScriptFileName>
<CreateNewDatabase>False</CreateNewDatabase>
<IncludeCompositeObjects>True</IncludeCompositeObjects>
<GenerateSmartDefaults>True</GenerateSmartDefaults>
<BlockOnPossibleDataLoss>True</BlockOnPossibleDataLoss>
<DropObjectsNotInSource>False</DropObjectsNotInSource>
@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
@mwwhited
mwwhited / SQL Table as Queue.md
Last active April 8, 2021 17:49
SQL Table as Queue

Simple TSQL Table as Queue

Show unlocked events

SELECT
	*
FROM dbo.queue WITH (READPAST)
;
@mwwhited
mwwhited / AzureDevopsBranchTagging.md
Created August 21, 2021 03:47
Azure Deops Tag Branch on Build

Azure DevOps Pipeline Branch Tagging

Summary

It is possible to git repositories in Azure Devops as part of your automated build process.

Build Scripts

Manually checkout your git repository need the beginning of your job. Ensure to persist credentials so you can authenticate against git later.

@mwwhited
mwwhited / eclipse-format.xml
Created January 2, 2022 02:10 — forked from snipsnipsnip/eclipse-format.xml
C#-like eclipse code format settings
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles version="11">
<profile kind="CodeFormatterProfile" name="C#-like" version="11">
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>

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
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')