Images in Documents

February 21, 2023

I like to write documents that incorporate a little bit of fun. To do this, I will add occasional sections with whimsical images – sort of like “Dummies Guide to” style. In my Word or PDF documents, I attribute by creating a Credits section at the front of the document with the images I used in a line:

Quickly Create JSON Serialization Classes

February 8, 2023

If you have a non-trivial JSON object, it can be time consuming to create classes the can be used for serialization/deserialization. This web site can help you out no matter what type of language you want to work with. Procedure The resulting classes are regenerated automatically if you modify any settings or change the JSON file. Copy the… Read More »

Move Uncommitted Work to New Git Branch

February 7, 2023

Maybe it’s just me, but I frequently PR my git branch to dev then forget that the git squash removed my old branch and the code I have been working on since the PR needs a new branch. Fortunately, it is easy to create a new branch and move your work to a legitimate branch. Obviously this is… Read More »

Net.TCP Port Sharing Service (SMSvcHost)

February 28, 2023

Windows Communication Foundation (WCF) uses a Windows service called the Net.TCP Port Sharing Service to facilitate the sharing of TCP ports across multiple processes. This service is installed as part of WCF, but the service is not enabled by default as a security precaution and so must be manually enabled prior to first use.  To enable the service,… Read More »

Windows User Security Identifier – SID

March 3, 2023

Microsoft Windows security uses SIDs for authentication. This number uniquely identifies accounts on a local computer. The account name can be changed, but the SID remains the same. When a computer joins a domain, the domain controller assigns it a Domain SID for authentication purposes. Determine the Current User’s SID Open a (DOS or PowerShell) command prompt and… Read More »

PowerShell: Aliases

January 27, 2023

PowerShell defines short forms forms for the long hyphen separated commands it provides. You can see the current aliases for you system by entering: Below is the result for a typical system. I am only providing the “Name” column. Also, I massaged the output so the columns would line up and be easier to read.

PowerShell: Environment Variables

January 27, 2023

We can get a single variable. Or get all of them at once. However, since each environment variable result is truncated to a single line, you will not be able to see all of certain ones – like Path. Use below to wrap all the values to multiple lines. Set Environment Variables To set an environment variable for… Read More »

Visual Studio Pre/Post Build Macros

February 28, 2023

Visual Studio allows the user to add pre-build and post-build steps when a project is built. This allows you to add custom steps to prepare the environment, copy files to installer folders, etc. By using previously defined macros, you can get build specific information. Below is an example of some. These are actually MSBuild macros and many more… Read More »