Skip to content

Instantly share code, notes, and snippets.

Avatar

Matthew Whited mwwhited

View GitHub Profile
@mwwhited
mwwhited / VersionSqlProj.md
Last active Nov 20, 2020
Add versioning to SQL Server Projects
View VersionSqlProj.md

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 Nov 20, 2020
Configure and use GitVersion
View UsingGitVersion.md

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 / SimpleScaffoldEfCodeFirst.md
Created Nov 20, 2020
Generate EF Properties for MS SQL View
View SimpleScaffoldEfCodeFirst.md

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 Nov 20, 2020
Radex One protocol reverse engineering notes.
View RadexOneReverseEngineerNotes.md

Radex One - USB Serial Trace

Summary

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

Notes

○ Examples
@mwwhited
mwwhited / EnumerateMsSql.md
Last active Nov 20, 2020
Enumerate schema of a MS SQL database
View EnumerateMsSql.md

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 / MergeGitRepositoryIntoSecondRemote.md
Created Nov 20, 2020
Move/Merge Git into different remote
View MergeGitRepositoryIntoSecondRemote.md

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…
View GitTips.md

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 Dec 7, 2020
USB HID Decoding Tips
View UsbHidDecode.md

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

View TsqlImpersonateWithMasking.md

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]
View AzureDevopsPrivateNuget.md

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