Skip to content

Instantly share code, notes, and snippets.

View mwwhited's full-sized avatar

Matthew Whited mwwhited

View GitHub Profile
@mwwhited
mwwhited / VersionSqlProj.md
Last active August 23, 2024 13: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

@mwwhited
mwwhited / UsingGitVersion.md
Created November 20, 2020 12:38
Configure and use GitVersion

Using GitVersion

Summary

Gitversion is a tool to generate version numbers based on your git repository commit history.

Configure

To customize GitVersion create a GitVersion.yml file at the root of your repository. Use this file to configure your repository. For framework libraries it is suggested to use Continuous Deliver for

@mwwhited
mwwhited / EnumerateMsSql.md
Last active November 20, 2020 13:21
Enumerate schema of a MS SQL database

Enumerate Contents of an MS SQL Database

Summary

As Dataset

This will create a dataset listing all all schemas, objects and columns within the current database

SELECT 
@mwwhited
mwwhited / SimpleScaffoldEfCodeFirst.md
Created November 20, 2020 12:55
Generate EF Properties for MS SQL View

Generate Properties from MS SQL View Columns

Summary

This script may be used to generate the properties expected for an EF Entity to back a DBSet<> for a view.

DECLARE @procName NVARCHAR(2000) = '[dbo].[YourTable]';

WITH [SystemTypes] AS (
@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 / 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…
@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 / 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

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]

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