Skip to content

Instantly share code, notes, and snippets.

View mwwhited's full-sized avatar

Matthew Whited mwwhited

View GitHub Profile
@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 / 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 / .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

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]

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

Create Private NuGet feed for use with Azure Devops

Summary

It is possible to host and publish to a private NuGet feed within Azure DevOps

Process

  • Under Artifacts click Create Feed
    • Name the feed as desired

TSQL Impersonation with Dynamic Datamasking

Summary

It is possible to use impersonation to change between a masked and unmasked data within the same connection.

/*
CREATE USER [unmasked] WITHOUT LOGIN WITH DEFAULT_SCHEMA=[dbo]
@mwwhited
mwwhited / UsbHidDecode.md
Last active December 7, 2020 22:39
USB HID Decoding Tips

HID USB Decoding

Summary

This is a guide on how you can decode existing USB devices and protocols.

Wireshark with USBPcap

Wireshark makes it possible to trace and capture raw data from USB Devices

@mwwhited
mwwhited / GitTips.md
Last active December 4, 2020 16:18
git tips

Git Notes

Summary

I can't remember all this voodoo so maybe this will help.

Commands

force accept remote changes

@mwwhited
mwwhited / MergeGitRepositoryIntoSecondRemote.md
Created November 20, 2020 13:27
Move/Merge Git into different remote

Merge Git repository into second remote

Some times you need to move or merge git repositories... here is the general list of commands

git remote rename origin upstream
git pull upstream master
git remote add origin NEW_URL_HERE
git pull origin master --allow-unrelated-histories
…do merge voodoo…