Posts
-
Publishing to the ATmosphere
Using standard.site and sequoia.pub, my blob should now start publishing documents to ATProto. -
Cross-compiling x64 on Aarch64
How to support cross-compiling -sys crates for x64 (x86_64) on Ubuntu 24.04 aarch64 (arm64) in WSL2. -
Cleaning up Rust
Tips for cleaning up after Rust, which can consume a lot of disk space. -
12 Months: Over 7000m with Strava
Why I pushed myself to earn 12 months straight of Strava's 7,000m Elevation Challenge, and how I'm on track to top 100km elevation in just a year's time. -
Helix support for TypeSpec
You can add TypeSpec language support to Helix fairly easily. I’ve done this in my profile repo and you can copy the code. I hope to get this added to Helix if they’ll accept an up-and-comer.
-
Using 1Password for git SSH signatures in WSL
1Password allows developers to sign git commits using SSH by setting up their own SSH agent. Doing this in your host platform e.g., Windows, is relatively straight forward but if you want to set this up in Windows Subsystem for Linux (WSL) there is additional configuration you need to perform.
-
Oh My Posh
As a terminal junky, many years ago I customized my PowerShell
$profileto define a customfunction:prompt. This included custom parsing for any.gitdirectory (even.hgfor Mecurial!), and eventually any.gitfile to support worktrees and submodules. It was fast and, last I knew, still powered some internal environments we use at work. -
On Mastodon
While I haven’t yet left Twitter, I’ve joined many in the #TwitterMigration to Mastodon or, more specifically, Fosstodon. While I appreciate it’s a federated network of nodes - much like IRC of old - I am slightly disappointed I either deleted or let lapse my old mastodon.social account I opened many years ago when it first started going public. Being on that instance is like a badge of honor, but a pointless digital badge, so 🤷♂️.
-
Reduce fetch and checkout times in git
Some repos can be huge, like Azure/azure-sdk-for-net (at the time this was written) due to a number of factors, like history, old binaries, or other large files. A repo could also have a relatively small history but a huge amount of files that take a very long time to check out. You can both reduce the time it takes to fetch such a repo and how long it takes to check out files.
-
git sync any branch
Sometime ago I blogged about
git sync, an alias I created to concisely pull the upstream repo’s main branch, push that branch to my origin fork, and fetch origin branches to determine which branches have been deleted - likely from merged pull requests. As many repos I work in have changed frommastertomain, not all of them have yet. Some also usetrunkwhich, personally, I like better but is less common thanmain. -
Table formatting in GitHub CLI 2.0
Use table formatting functions in template to get the same great table output as with built-in GitHub CLI commands. -
Add aliases to GitHub CLI from stdin
Add multiline aliases or aliases with mixed quotes easily with gh version 1.10. -
gh user
How to define a GitHub CLI alias to query users who can be assigned issues within the current repository. -
Configure Multiple Clocks
One of the great aspects of working for a large global company like Microsoft is working with a lot of diverse people. Working across time zones has its difficulties, though. I know that India is about 12 hours ahead of us, but with different observed timezone offsets it’s difficult to remember exactly. For a recent project I started working on, I also work with a lot of people in or around Cairo, Egypt.
-
Debugging tests in Linux containers with Visual Studio
Some recent tests failures for the Azure Key Vault Certificates client libraries for .NET required debugging on Linux, and while I frequently use WSL2 (even to write this post), I needed a fresh Ubuntu 18.04 image similar to our live testing agents. Fortunately, recent versions of Visual Studio 2019 have included the component “.NET Core Debugging with WSL 2”.
-
Getting back to a good state in Git
I was helping a colleague the other day after they merged the
masterbranch into their older topic branch, which brought along a lot of other commits and made the pull request on GitHub huge - too many files to even review in full on GitHub or in Visual Studio Code. I commented that instead, rebasing ontomaster(or whatever branch you want to merge) is cleaner. First, however, you have to get back to a good state. -
Batch operations with Azure CLI in bash
While I use PowerShell on a daily basis, the Azure CLI has better support for Azure management and some data operations. It also runs faster on WSL2, since python.exe startup on Windows could use some performance work.
-
git sync
Define a git alias to easily pull from your upstream main branch and sync to your origin main branch. -
Fixing Time Drift in Docker on WSL2
WSL2 has been amazing! It’s so much faster than WSL, and Git commands and Python scripts just run faster. But what really gets me giddy is Docker on WSL2. No Hyper-V VM - in fact, Hyper-V doesn’t even need to be installed. I loved Hyper-V, but with Docker and WSL2 I haven’t had much reason to run it. It’s just works…well, usually.
-
Simple WiX Project
Globally-unique identifiers (GUIDs) are often the brunt of jokes. Windows Installer packages (.msi files) are full of them, from the required ProductCode, to highly-recommended UpgradeCode, package codes, and required component GUIDs. Authoring an MSI doesn’t require you create and manage so many GUIDs, however. In fact, Windows Installer XML (WiX) has in the last few years made great strides in making sure you don’t have to, and recommends you don’t.
-
Get Azure Search Keys in ARM Templates
Late in 2019 I start working with a colleague on a common pattern of creating test resources using ARM templates. A script deploys the template using a common set of variables and outputs both common variables and any custom variables that tests for a service needs. The Azure Cognitive Search service, for example, needs both admin keys for read-write operations, and query keys for read-only operations.
-
Powerline in Vim
As a long-time vim user (though I more commonly use Code these days), I relish the opportunity to improve my experience. I’ve been using Powerline for my bash prompt for a while and even developed a pure PowerShell variant. I wanted to integrate it into my vim profile which I maintain as a Git repo across many different machines, physical or virtual.
-
Tracing Azure SDK for .NET
The new Azure SDK has a lot of new features that make it worth migrating from Microsoft.Azure.* to Azure.* packages. Logging is greatly improved and is consistent across client libraries. All clients will log request and response information automatically when AppInsights or OpenTelemetry is configured.
-
Rebasing commits on one topic branch onto another branch
Rebasing commits on one topic branch onto another topic branch is a great way to stay productive while waiting for pull requests to be reviewed. Even if subsequent commits are made to the original topic branch, you can still create a subsequent PR with only intended changes.
-
Welcome to my blog
After many years of being https://blogs.msdn.com/heaths and changing positions, it was time to set up a new blog for technical tips and trips, as well as personal adventures.
subscribe via RSS