Display Value in Engineering Notation

November 26, 2020

As all electrical engineers, I work with a large range of numbers for various components – from 22 pF capacitors (22* 1e-12) to 2 MΩ resistors (2* 1e+6). To make the work a little easier, we tend to use Engineering Notation. This ensures the SI prefixes are multiples of three. Just try quickly adding 4 deciFarad to 7… Read More »

Embed File in Assembly with MSBuild Targets

February 28, 2023

I have a problem – I want to automatically generate a license file then embed the file in my C# assembly. This solution works by creating a new MSBuild targets file and embedding it in my project (csproj) file. Let’s start by modifying my project file. I imported the new MSBuild targets file near the bottom of my… Read More »

Azure Pipeline Debugging Snippets

September 11, 2024

These are pipeline YAML snippets that I have found very handy. Print all Environmental Variables This is essential for debugging paths and composite variables. It generates an output similar to this. Notice that the environment variables are sorted and the trailing Format-Table with the -wrap parameter will ensure the values are not cut off at the end of… Read More »

Azure Pipeline Variables

August 14, 2024

There exists several types of variables that can be added to YAML scripts. I really like the Microsoft page that lays out a table that specifies the type of variable and when its value is computed and set. I have reproduced it below. The Azure documentation is listed in the Links section. Variable Naming Restrictions User-defined and environment… Read More »

Conditions and DependsOn in Azure Pipeline YAML

October 26, 2020

I needed the ability to automatically build one of several possible build types for testing. I also wanted to just change one variable in the YAML to update the build type. This is an excellent use for pipeline “conditions”. Conditions can be used to enable a step, job, or stage. In this example, the user can select between… Read More »

Typical Environment Variables in Azure DevOps Pipeline

August 13, 2024

This an an example of many of the environmental variables available to the build pipeline. The following YAML step… …created the following (excerpted) list. Variables are treated in different ways depending on the type it is and how it is references in the YAML file. See Azure Pipeline Variables article for more information.

Checkout Additional Git Repos in Azure Pipeline

October 26, 2020

The typical use case for my department is that when a build is triggered in Azure DevOps, we automatically load the single Git repository. Note that for these examples, the self repository is named ProductXYZ. the self repo is the one that triggered the build to occur because of an automatic trigger (someone committed changes to the repo)… Read More »

Git Cheat Sheet

March 17, 2021

I’ve dipped my toes in the Git waters for over 10 years. I must confess that I never really grokked it. It might be that I never worked in a multi-user repo environment with Git. Or it might be that working with it for one month every year wasn’t enough to make it stick. So I decided to… Read More »

WordPress by example: $wp_query

April 3, 2023

We should be familiar with the concept of the loop. As demonstrated below, the WordPress template logic will continue to get posts until there are no more. With each iteration of the loop, we get the post using a SQL query and save the retrieve information int the global variable $wp_query. Notice that we do not need to… Read More »