<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Stuart McColl</title><link>https://stuartmccoll.github.io/</link><description>Recent content on Stuart McColl</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Sat, 28 Oct 2023 11:45:00 +0100</lastBuildDate><atom:link href="https://stuartmccoll.github.io/index.xml" rel="self" type="application/rss+xml"/><item><title>10 sessions to see at GitHub Universe 2023</title><link>https://stuartmccoll.github.io/posts/2023-10-27-10-talks-to-see-at-github-universe-2023/</link><pubDate>Sat, 28 Oct 2023 11:45:00 +0100</pubDate><guid>https://stuartmccoll.github.io/posts/2023-10-27-10-talks-to-see-at-github-universe-2023/</guid><description>GitHub Universe takes place on November 8th and 9th this year, live and virtual. I&amp;rsquo;ve put together a list of ten sessions that I&amp;rsquo;m particularly looking forward to.
Opening Keynote This year&amp;rsquo;s keynote will see GitHub CEO Thomas Dohmke and others look at what it means to be a software development platform in the age of AI.
GitHub Copilot: the AI pair programmer for today and tomorrow Folks from both GitHub and Microsoft will be talking about the shift in software development caused by GitHub Copilot, and other developments in the world of AI-assisted programming.</description></item><item><title>Use PowerShell to find deallocated Azure VMs</title><link>https://stuartmccoll.github.io/posts/2023-06-24-use-powershell-to-fund-deallocated-azure-vms/</link><pubDate>Sat, 24 Jun 2023 11:30:00 +0100</pubDate><guid>https://stuartmccoll.github.io/posts/2023-06-24-use-powershell-to-fund-deallocated-azure-vms/</guid><description>In this post, I&amp;rsquo;ll show you how to find deallocated Azure Virtual Machines using the Azure Resource Graph PowerShell module.
Install the Azure Az PowerShell module We&amp;rsquo;re going to follow this guide on Microsoft Learn to install the Azure Az PowerShell module.
I&amp;rsquo;m going to assume that you have the latest version of PowerShell installed. If you don&amp;rsquo;t, you can follow this guide on Microsoft Learn.
Run the following command in a PowerShell session:</description></item><item><title>My Microsoft Build 2023 takeaways</title><link>https://stuartmccoll.github.io/posts/2023-06-06-microsoft-build-2023-takeaways/</link><pubDate>Tue, 06 Jun 2023 22:15:00 +0100</pubDate><guid>https://stuartmccoll.github.io/posts/2023-06-06-microsoft-build-2023-takeaways/</guid><description>I&amp;rsquo;m slowly working my way through my backlog of Microsoft Build 2023 session recordings, but wanted to take some time out to summarise my key takeaways from this year&amp;rsquo;s event.
The common thread that ran throughout the event this year was artifical intelligence (AI), woven into sessions focused on what developers are building and how they&amp;rsquo;re building it, as well as sessions looking at the future of work and how this will be impacted by AI.</description></item><item><title>Use PowerShell to monitor system performance</title><link>https://stuartmccoll.github.io/posts/2023-05-01-use-powershell-to-monitor-system-performance/</link><pubDate>Mon, 01 May 2023 11:15:00 +0100</pubDate><guid>https://stuartmccoll.github.io/posts/2023-05-01-use-powershell-to-monitor-system-performance/</guid><description>In this post, I&amp;rsquo;ll show you how to monitor system performance using PowerShell. I&amp;rsquo;ll introduce you to a few different cmdlets and some examples of how you might use them to monitor the performance of a system.
Get-Process This cmdlet provides information about all of the running processes on a system, including their process ID, their CPU usages, and their memory usage.
You might use this cmdlet to:
Get the five processes using the most CPU: Get-Process | Sort-Object -Property CPU | Select-Object Name,CPU -Last 5.</description></item><item><title>Use Bicep to create an Azure key vault</title><link>https://stuartmccoll.github.io/posts/2023-04-23-use-bicep-to-create-a-key-vault/</link><pubDate>Sun, 23 Apr 2023 22:00:00 +0100</pubDate><guid>https://stuartmccoll.github.io/posts/2023-04-23-use-bicep-to-create-a-key-vault/</guid><description>In this post, I&amp;rsquo;ll show you how to create a Bicep file which declares an Azure key vault resource containing a single secret.
Prerequisites I&amp;rsquo;ll be using Visual Studio Code as my editor, where I&amp;rsquo;ll be writing the .bicep file for this walkthrough. I&amp;rsquo;ll also be using the official Bicep extension.
I&amp;rsquo;ll be using the Azure Az PowerShell module to handle deploying the resources declared in the .bicep file I create.</description></item><item><title>Use GitHub Actions to validate Bicep files</title><link>https://stuartmccoll.github.io/posts/2023-04-22-use-github-actions-to-validate-bicep-files/</link><pubDate>Sat, 22 Apr 2023 11:30:00 +0100</pubDate><guid>https://stuartmccoll.github.io/posts/2023-04-22-use-github-actions-to-validate-bicep-files/</guid><description>In this post, I&amp;rsquo;ll show you how to validate Bicep files using GitHub Actions.
What is GitHub Actions? GitHub Actions is a continuous integration and continuous delivery (CI/CD) platform built into GitHub. It allows for the automation of build, test, and deployment pipelines.
It can also be used for running workflows based on other repository events, like automatically responding to created issues.
The structure of a GitHub Actions workflow GitHub Actions workflows are made up of three things.</description></item><item><title>Use PowerShell to find empty files</title><link>https://stuartmccoll.github.io/posts/2023-04-15-use-powershell-to-find-empty-files/</link><pubDate>Sat, 15 Apr 2023 09:30:00 +0100</pubDate><guid>https://stuartmccoll.github.io/posts/2023-04-15-use-powershell-to-find-empty-files/</guid><description>In this post, I&amp;rsquo;ll show you how to find empty files using PowerShell.
Find empty files in the current working directory The following command will retrieve empty files within the current working directory (e.g., it won&amp;rsquo;t recursively search within inner directories). It&amp;rsquo;ll return the full file path to any empty files that it finds.
Get-ChildItem -File | Where-Object { $_.PSIsContainer -eq $false -and $_.Length -eq 0 } | Select -ExpandProperty FullName We&amp;rsquo;re using the Get-ChildItem cmdlet here to retrieve a list of all files within the current working directory.</description></item><item><title>Use PowerShell to find large files</title><link>https://stuartmccoll.github.io/posts/2023-04-07-use-powershell-to-find-large-files/</link><pubDate>Fri, 07 Apr 2023 12:00:00 +0100</pubDate><guid>https://stuartmccoll.github.io/posts/2023-04-07-use-powershell-to-find-large-files/</guid><description>In this post, I&amp;rsquo;ll show you how to find large files using PowerShell.
Using the Get-ChildItem cmdlet Searching for files based on different properties can all be done using PowerShell&amp;rsquo;s built-in Get-ChildItem cmdlet.
Find the largest files within the current working directory The following command will retrieve the ten largest files within the current working directory (e.g., it won&amp;rsquo;t recursively search within inner directories). It&amp;rsquo;ll sort these ten results in descending size order, returning the file names and the file size.</description></item><item><title>Use Bicep to create an Application Insights resource</title><link>https://stuartmccoll.github.io/posts/2023-04-01-use-bicep-to-create-an-application-insights-resource/</link><pubDate>Sat, 01 Apr 2023 21:00:00 +0100</pubDate><guid>https://stuartmccoll.github.io/posts/2023-04-01-use-bicep-to-create-an-application-insights-resource/</guid><description>In this post, I&amp;rsquo;ll show you how to create a Bicep file which declares the resources required for an Application Insights instance, specifically one used to monitor a website.
Prerequisites I&amp;rsquo;ll be using Visual Studio Code as my editor, where I&amp;rsquo;ll be writing the .bicep file for this walkthrough. I&amp;rsquo;ll also be using the official Bicep extension.
I&amp;rsquo;ll be using the Azure Az PowerShell module to handle deploying the resources declared in the .</description></item><item><title>Use PowerShell to find empty Azure resource groups</title><link>https://stuartmccoll.github.io/posts/2023-03-29-use-powershell-to-find-empty-azure-resource-groups/</link><pubDate>Wed, 29 Mar 2023 20:00:00 +0100</pubDate><guid>https://stuartmccoll.github.io/posts/2023-03-29-use-powershell-to-find-empty-azure-resource-groups/</guid><description>In this post, I&amp;rsquo;ll show you how to find and remove empty Azure resource groups using the Azure Az PowerShell module.
Install the Azure Az PowerShell module We&amp;rsquo;re going to follow this guide on Microsoft Learn to install the Azure Az PowerShell module.
I&amp;rsquo;m going to assume that you have the latest version of PowerShell installed. If you don&amp;rsquo;t, you can follow this guide on Microsoft Learn.
Run the following command in a PowerShell session:</description></item><item><title>Use PowerShell to find untagged Azure resources</title><link>https://stuartmccoll.github.io/posts/2023-03-28-use-powershell-to-find-untagged-azure-resources/</link><pubDate>Tue, 28 Mar 2023 11:00:00 +0100</pubDate><guid>https://stuartmccoll.github.io/posts/2023-03-28-use-powershell-to-find-untagged-azure-resources/</guid><description>In this post, I&amp;rsquo;ll show you how to retrieve Azure resources that do not have any associated tags.
Install the Azure Az PowerShell module We&amp;rsquo;re going to follow this guide on Microsoft Learn to install the Azure Az PowerShell module.
I&amp;rsquo;m going to assume that you have the latest version of PowerShell installed. If you don&amp;rsquo;t, you can follow this guide on Microsoft Learn.
Run the following command in a PowerShell session:</description></item><item><title>Use Bicep to create an Azure Function App</title><link>https://stuartmccoll.github.io/posts/2023-03-26-use-bicep-to-create-an-azure-function-app/</link><pubDate>Sun, 26 Mar 2023 15:00:00 +0100</pubDate><guid>https://stuartmccoll.github.io/posts/2023-03-26-use-bicep-to-create-an-azure-function-app/</guid><description>In this post, I&amp;rsquo;ll show you how to create a Bicep file which declares the resources required for an Azure Function App.
Prerequisites I&amp;rsquo;ll be using Visual Studio Code as my editor, where I&amp;rsquo;ll be writing the .bicep file for this walkthrough. I&amp;rsquo;ll also be using the official Bicep extension.
I&amp;rsquo;ll be using the Azure Az PowerShell module to handle deploying the resources declared in the .bicep file I create. You can find instructions on installing the module at Microsoft Learn.</description></item><item><title>Use PowerShell to retrieve Azure location information</title><link>https://stuartmccoll.github.io/posts/2023-03-24-use-powershell-to-retrieve-azure-location-information/</link><pubDate>Fri, 24 Mar 2023 18:30:00 +0100</pubDate><guid>https://stuartmccoll.github.io/posts/2023-03-24-use-powershell-to-retrieve-azure-location-information/</guid><description>In this post, I&amp;rsquo;ll show you how to retrieve Azure location names using PowerShell; specifically, using the Azure Az PowerShell module.
Install the Azure Az PowerShell module We&amp;rsquo;re going to follow this guide on Microsoft Learn to install the Azure Az PowerShell module.
I&amp;rsquo;m going to assume that you have the latest version of PowerShell installed. If you don&amp;rsquo;t, you can follow this guide on Microsoft Learn.
Run the following command in a PowerShell session:</description></item><item><title>Use Bicep to create a monthly budget in Azure</title><link>https://stuartmccoll.github.io/posts/2023-03-19-use-bicep-to-create-a-monthly-budget-in-azure/</link><pubDate>Sun, 19 Mar 2023 21:00:00 +0100</pubDate><guid>https://stuartmccoll.github.io/posts/2023-03-19-use-bicep-to-create-a-monthly-budget-in-azure/</guid><description>I&amp;rsquo;ve recently started experimenting with Bicep for deploying Azure resources declaratively.
In this post, I&amp;rsquo;ll show you how to create a Bicep file which declares a simple Azure Budget with a monthly alert.
Creating the .bicep file Create a new file, called main.bicep.
The first thing we&amp;rsquo;ll declare in this file is the target scope of any resources that we create. In this case, the Budget we&amp;rsquo;re creating will be created at a Subscription level.</description></item><item><title>Sync contents between two S3 Buckets</title><link>https://stuartmccoll.github.io/posts/2023-01-14-sync-contents-between-s3-buckets/</link><pubDate>Sat, 14 Jan 2023 11:32:05 +0000</pubDate><guid>https://stuartmccoll.github.io/posts/2023-01-14-sync-contents-between-s3-buckets/</guid><description>Something I&amp;rsquo;ve had to do on more than one occassion recently is copy the contents of one S3 bucket to another S3 bucket. There is no built-in way of doing this in the AWS Management Console, but it is possible using the AWS Command Line Interface (CLI).
As an example, I&amp;rsquo;m going to create two new S3 buckets in my AWS account using Terraform, push some objects into my source bucket, and then copy the contents of this bucket into my target bucket.</description></item><item><title>Maintain an Azure Container Registry using a PowerShell Azure Function</title><link>https://stuartmccoll.github.io/posts/2022-09-10-maintain-acr-using-azure-function/</link><pubDate>Sat, 10 Sep 2022 23:00:00 +0100</pubDate><guid>https://stuartmccoll.github.io/posts/2022-09-10-maintain-acr-using-azure-function/</guid><description>This year I created a small C# CLI application that scrapes this website and stores the results in Azure Blob Storage. It&amp;rsquo;s essentially a not-very-good version of the the Internet Archive&amp;rsquo;s Wayback Machine, but specific only to this website.
The process happens in two parts. If I merge any pull requests on the website-archiver into main, then a GitHub Actions workflow pushes the latest Docker image to an Azure Container Registry.</description></item><item><title>Push a Docker image to Azure Container Registry using a GitHub Actions workflow</title><link>https://stuartmccoll.github.io/posts/2022-06-11-github-action-to-azure-container-registry/</link><pubDate>Sat, 11 Jun 2022 11:15:00 +0100</pubDate><guid>https://stuartmccoll.github.io/posts/2022-06-11-github-action-to-azure-container-registry/</guid><description>Building and pushing Docker images to Azure Container Registry is simple with a small GitHub Actions workflow.
This blog post assumes you&amp;rsquo;ve got a docker-compose.yml file in your GitHub repository. If you&amp;rsquo;re just using a Dockerfile, you&amp;rsquo;ll need to make a tiny amendment to the Build Docker image step in the push-to-acr.yml file described below.
Microsoft Azure setup/configuration If you&amp;rsquo;re starting fresh, in terms of our Azure setup we&amp;rsquo;ll need:</description></item><item><title>Use PowerShell to generate a GUID</title><link>https://stuartmccoll.github.io/posts/2022-06-02-use-powershell-to-generate-a-guid/</link><pubDate>Thu, 02 Jun 2022 11:05:00 +0100</pubDate><guid>https://stuartmccoll.github.io/posts/2022-06-02-use-powershell-to-generate-a-guid/</guid><description>Another quick automation using PowerShell, this time to solve the problem of quickly adding a new GUID to the clipboard.
The New-Guid cmdlet will quickly create a random globally unique identifier, with the below output.
Guid ---- 8c312165-113b-4c30-91e9-e4e6edebcf0b This is great, but I&amp;rsquo;ve got a couple of extra needs; I don&amp;rsquo;t need the - characters, and I want the GUID to be added straight to my clipboard.
Ignoring the header is simple:</description></item><item><title>Use PowerShell to create a .zip file</title><link>https://stuartmccoll.github.io/posts/2022-05-28-use-powershell-to-create-a-zip-file/</link><pubDate>Sat, 28 May 2022 11:30:00 +0100</pubDate><guid>https://stuartmccoll.github.io/posts/2022-05-28-use-powershell-to-create-a-zip-file/</guid><description>A simple automation need that I stumbled across recently was the ability to quickly create a .zip file from a static set of files and directories. Rather than run a long command in PowerShell each time, I bundled everything up into a quick function that I can run using New-StaticZipFile.
The Compress-Archive cmdlet lets us create a compressed, or zipped, archive file. There are limitations (e.g. maximum file size is 2GB) to this cmdlet, as well as more advanced options, such as the level of compression needed, but we&amp;rsquo;ll be keeping it really simple here.</description></item><item><title>How to lnstall local Powershell Modules</title><link>https://stuartmccoll.github.io/posts/2021-10-02-how-to-install-local-powershell-modules/</link><pubDate>Sat, 02 Oct 2021 14:16:33 +0100</pubDate><guid>https://stuartmccoll.github.io/posts/2021-10-02-how-to-install-local-powershell-modules/</guid><description>I keep some custom PowerShell modules stored locally on different machines, depending on the type of machine. For example, my work laptop has modules for setup and teardown of my development environment, which are modules that I don&amp;rsquo;t keep around on my personal desktop machine.
Rather than have all of this live in a PowerShell profile which I do share between different machines, I keep a tiny bit of code in my shared profile which will import any custom modules found locally.</description></item><item><title>How to install Windows Package Manager (WinGet) on Windows 10</title><link>https://stuartmccoll.github.io/posts/2021-07-11-how-to-install-winget/</link><pubDate>Sun, 11 Jul 2021 11:55:02 +0100</pubDate><guid>https://stuartmccoll.github.io/posts/2021-07-11-how-to-install-winget/</guid><description>The Windows Package Manager client (also known as WinGet) celebrated it&amp;rsquo;s v1.0 release in May of 2021, after announcing at Microsoft Build 2020.
At the time of writing, although the client is distributed within the App Installer package, it isn&amp;rsquo;t generally available unless you&amp;rsquo;re running a Windows 10 Insider build, or have signed up to the Preview flight ring.
However, it&amp;rsquo;s simple to download and install the package from the official GitHub repository.</description></item><item><title>Set WSL as the default integrated terminal in Visual Studio Code</title><link>https://stuartmccoll.github.io/posts/2021-06-08-set-wsl-as-default-vscode-terminal/</link><pubDate>Tue, 08 Jun 2021 10:00:13 +0100</pubDate><guid>https://stuartmccoll.github.io/posts/2021-06-08-set-wsl-as-default-vscode-terminal/</guid><description>If you&amp;rsquo;re using Windows Subsystem for Linux (WSL) in tandem with Visual Studio Code, you might be wondering how to change your default integrated terminal from PowerShell to WSL.
Previously, you could set this in a single line in your settings.json file using terminal.integrated.shell.windows, but this has since been deprecated in a later version of Visual Studio Code.
Add the following snippet of JSON to your settings.json file in Visual Studio Code (you can access this file by clicking the gear icon in the bottom left hand corner of the screen, selecting the &amp;lsquo;Settings&amp;rsquo; menu option, and then clicking on the &amp;lsquo;Open settings (JSON)&amp;rsquo; icon in the top right hand corner of the subsequent screen - alternatively you can open the Command Palette with CTRL + Shift + P and then type in &amp;lsquo;Open settings (JSON)'):</description></item><item><title>Automate the shutdown of a Windows 10 PC</title><link>https://stuartmccoll.github.io/posts/2020-10-14-automate-windows-10-shutdown/</link><pubDate>Wed, 14 Oct 2020 10:00:00 +0100</pubDate><guid>https://stuartmccoll.github.io/posts/2020-10-14-automate-windows-10-shutdown/</guid><description>Using the shutdown command Setting a single, non-repeatable shutdown timer can be done using the shutdown command, which can be run in the Command Prompt or PowerShell. Let&amp;rsquo;s use PowerShell as an example.
Search for &amp;lsquo;PowerShell&amp;rsquo; in the start menu and open the app that is returned. Run the command shutdown -s -t TimeInSeconds where TimeInSeconds is replaced with the number of seconds after which you want the Windows 10 PC to shutdown.</description></item><item><title>The Push Declined Due to Email Privacy Restrictions error</title><link>https://stuartmccoll.github.io/posts/2020-10-10-push-declined-due-to-email-privacy-restrictions/</link><pubDate>Sat, 10 Oct 2020 11:41:22 +0100</pubDate><guid>https://stuartmccoll.github.io/posts/2020-10-10-push-declined-due-to-email-privacy-restrictions/</guid><description>This is a quick blog post detailing what to do if you receive the push declined due to email privacy restrictions error when attempting to push to a GitHub repository.
The error message tells us that your GitHub account has been configured to disallow the pushing of commits which might reveal a personal email address.
This means that in order to push commits to this remote repository, you&amp;rsquo;ll need to do one of two things:</description></item><item><title>Retrieving files from Microsoft Azure blob storage</title><link>https://stuartmccoll.github.io/posts/2020-09-21-azure-storage-api/</link><pubDate>Mon, 21 Sep 2020 18:08:50 +0100</pubDate><guid>https://stuartmccoll.github.io/posts/2020-09-21-azure-storage-api/</guid><description>Recently on the Digital Service Design Team at The National Lottery Heritage Fund we&amp;rsquo;ve been investigating Microsoft Azure blob storage as an option for storing files as part of a service we&amp;rsquo;re building.
Before writing any code, we tested some of our assumptions about things like access and structure by calling the Microsoft Azure Storage REST API from Postman. This post documents a few of those tests using a basic Azure blob storage setup, using a Shared Key authorisation scheme to list files in a container; list files using a prefix; and to retrieve a specific file.</description></item><item><title>Enabling the GitHub Secret Profile README.md</title><link>https://stuartmccoll.github.io/posts/2020-07-16-github-secret-repository-readme/</link><pubDate>Thu, 16 Jul 2020 18:00:00 +0100</pubDate><guid>https://stuartmccoll.github.io/posts/2020-07-16-github-secret-repository-readme/</guid><description>People on Twitter have recently discovered a GitHub secret. If you create a new GitHub repository with the same name as your profile name, you can add a README.md to your GitHub profile 1.
How to create a GitHub profile README.md Create a new GitHub repository. You&amp;rsquo;ll see two mandatory options when creating your repository - the &amp;lsquo;Owner&amp;rsquo; dropdown field and the &amp;lsquo;Repository name&amp;rsquo; input field. Ensure that the &amp;lsquo;Repository name&amp;rsquo; value is the same as the value in the &amp;lsquo;Owner&amp;rsquo; dropdown field.</description></item><item><title>Attaching to list items with the Microsoft SharePoint REST API</title><link>https://stuartmccoll.github.io/posts/2020-06-22-attaching-to-list-items-with-sharepoint-rest-api/</link><pubDate>Mon, 22 Jun 2020 16:00:48 +0100</pubDate><guid>https://stuartmccoll.github.io/posts/2020-06-22-attaching-to-list-items-with-sharepoint-rest-api/</guid><description>In my last blog post I explained how to create list items with Microsoft&amp;rsquo;s legacy SharePoint REST API using Postman. This post builds on that work to attach a file to an existing list item.
Assuming you&amp;rsquo;ve been following along, we have a SharePoint list with at least one item in it that we&amp;rsquo;ve created through a request sent from Postman to the Microsoft SharePoint REST API. The item we created will have been assigned an id within SharePoint.</description></item><item><title>Creating list items with the Microsoft SharePoint REST API</title><link>https://stuartmccoll.github.io/posts/2020-06-18-creating-list-items-with-sharepoint-rest-api/</link><pubDate>Thu, 18 Jun 2020 19:30:00 +0100</pubDate><guid>https://stuartmccoll.github.io/posts/2020-06-18-creating-list-items-with-sharepoint-rest-api/</guid><description>In my last blog post I explained how to authenticate requests to Microsoft&amp;rsquo;s legacy SharePoint REST API using Postman. This post builds on that work to store our access token as a Postman environment variable and to then send POST requests to the SharePoint REST API to create new items within an existing SharePoint list.
If you were following along previously, the last thing we did was to request an access token to use in future requests.</description></item><item><title>Microsoft SharePoint API Access with Postman</title><link>https://stuartmccoll.github.io/posts/2020-06-16-sharepoint-api-authentication-with-postman/</link><pubDate>Tue, 16 Jun 2020 21:30:00 +0100</pubDate><guid>https://stuartmccoll.github.io/posts/2020-06-16-sharepoint-api-authentication-with-postman/</guid><description>Microsoft Graph API has largely superceded v1 of the SharePoint REST API for API-driven interaction with SharePoint online, but there are still a few things that you can&amp;rsquo;t do with it. For example, at the time of writing, it&amp;rsquo;s not possible to use Microsoft Graph API to add attachments to a list item, or retrieve attachments from an existing list item. The legacy SharePoint REST API does allow for this functionality.</description></item><item><title>Fixing Azure Account Active Directory Association Error</title><link>https://stuartmccoll.github.io/posts/2020-05-15-azure-account-active-directory-error/</link><pubDate>Fri, 15 May 2020 20:01:32 +0100</pubDate><guid>https://stuartmccoll.github.io/posts/2020-05-15-azure-account-active-directory-error/</guid><description>If you&amp;rsquo;ve tried to create a Microsoft Azure subscription using an existing Microsoft 365 (formerly Office 365) or Microsoft Power BI account, depending on how the account is setup you might have been redirected to this static page which displays the following error message:
Your account belongs to a directory that cannot be associated with an Azure subscription. Please sign in with a different account.
It&amp;rsquo;s not immediately clear what this means.</description></item><item><title>AppleScript for Connecting Bluetooth Devices</title><link>https://stuartmccoll.github.io/posts/2020-05-02-applescript-bluetooth-devices/</link><pubDate>Sat, 02 May 2020 10:50:44 +0100</pubDate><guid>https://stuartmccoll.github.io/posts/2020-05-02-applescript-bluetooth-devices/</guid><description>Last week I wrote another AppleScript for automating a manual task I have to carry out each time I switch between my personal MacBook Pro and my work device. This time, I needed to write a script which would connect to my Bluetooth devices - a Magic Mouse, Magic Keyboard and my AirPods.
Rather than accessing the System Preferences application, which I demonstrated in my last AppleScript, this script needed to directly access the Bluetooth icon in the menu bar.</description></item><item><title>AppleScript for Configuring External Displays</title><link>https://stuartmccoll.github.io/posts/2020-04-27-applescript-external-displays/</link><pubDate>Mon, 27 Apr 2020 20:00:00 +0000</pubDate><guid>https://stuartmccoll.github.io/posts/2020-04-27-applescript-external-displays/</guid><description>AppleScript is a scripting language bundled within all versions of macOS, which allows for scripting of elements of the operating system and compatible applications.
I&amp;rsquo;d never touched it before, but decided to try to use it to automate setting the resolutions of my external displays when switching between my personal and work MacBook Pros. Sometimes the resolutions stick when switching between the two, sometimes they don&amp;rsquo;t. Rather than have to go into System Preferences &amp;gt; Displays and set them whenever the settings don&amp;rsquo;t stick, I quite liked the idea of just running a script and having something else take care of it for me.</description></item><item><title>HTTP/S Redirects for AWS Route 53 Using S3</title><link>https://stuartmccoll.github.io/posts/2020-02-07-http-redirects-for-aws-route-53-using-s3/</link><pubDate>Fri, 07 Feb 2020 20:45:35 +0000</pubDate><guid>https://stuartmccoll.github.io/posts/2020-02-07-http-redirects-for-aws-route-53-using-s3/</guid><description>I moved hosting of my domains recently from tsoHost to Amazon Web Services, as uptime on tsoHost seems to have been slowly getting worse. Rather than using disparate providers for different services, I chose AWS to sit everything under one provider.
Shifting to AWS itself was relatively easy - I&amp;rsquo;m now using Amazon WorkMail for my email service and Amazon Route 53 for DNS. The documentation for switching to both from another provider was straight forward and I was up and running within a few days.</description></item><item><title>Microservice Design Patterns: Aggregator</title><link>https://stuartmccoll.github.io/posts/microservice-design-patterns-aggregator/</link><pubDate>Mon, 17 Jun 2019 10:00:00 +0000</pubDate><guid>https://stuartmccoll.github.io/posts/microservice-design-patterns-aggregator/</guid><description>The aggregator design pattern is a simple way of providing a single, unified service capable of surfacing data from multiple microservices, and a commonly used pattern when implementing a microservice-based architecture.
Let&amp;rsquo;s imagine that we&amp;rsquo;ve been tasked with developing an internal API for our organisation - a general practice clinic. The API needs to consume data from three existing microservices, each of which is used by other services within the practice&amp;rsquo;s architecture - some services call these individually, some call all three.</description></item><item><title>Deploy a Serverless Flask Application with AWS Lambda</title><link>https://stuartmccoll.github.io/posts/deploy-a-serverless-flask-application-with-aws-lambda/</link><pubDate>Wed, 17 Oct 2018 22:00:00 +0000</pubDate><guid>https://stuartmccoll.github.io/posts/deploy-a-serverless-flask-application-with-aws-lambda/</guid><description>AWS Lambda lets us run code without provisioning or managing servers, paying only for the compute time of the running code. There&amp;rsquo;s no permanent infrastructure, and the server only has a life cycle of 40 milliseconds. AWS provides automatic horizontal scaling for Lambda applications, spinning up and down as many instances as are necessary.
An open source Python library, Zappa gives us the ability to build and deploy serverless, event-driven Python applications on AWS Lambda.</description></item><item><title>Designing Resilient APIs with Idempotency</title><link>https://stuartmccoll.github.io/posts/designing-resilient-apis-with-idempotency/</link><pubDate>Sun, 02 Sep 2018 18:50:00 +0000</pubDate><guid>https://stuartmccoll.github.io/posts/designing-resilient-apis-with-idempotency/</guid><description>How can we design APIs to be resilient when our networks necessarily aren&amp;rsquo;t? An API should be robust enough to handle failure scenarios including connectivity drops, timeouts between resultant calls, and more. If a client makes a request to our API and loses connection during the request, how can we ensure that a successive identical request doesn&amp;rsquo;t alter the state of the system in a way that we weren&amp;rsquo;t expecting? This is where idempotence comes into play.</description></item><item><title>Python 3.7 Data Classes</title><link>https://stuartmccoll.github.io/posts/python-3.7-data-classes/</link><pubDate>Sun, 08 Jul 2018 19:50:00 +0000</pubDate><guid>https://stuartmccoll.github.io/posts/python-3.7-data-classes/</guid><description>PEP 557 in the recently-released Python 3.7 added data classes to the standard Python library. Data classes can be thought of as mutable data holders and are somewhat similar to named tuples, although named tuples are immutable.
Data classes provide a lot of boilerplate code, saving time and effort on the part of the Python programmer, although it could be argued that this layer of abstraction makes debugging more difficult.</description></item><item><title>GitLab Changelog Generator</title><link>https://stuartmccoll.github.io/posts/gitlab-changelog-generator/</link><pubDate>Sat, 23 Jun 2018 22:50:00 +0000</pubDate><guid>https://stuartmccoll.github.io/posts/gitlab-changelog-generator/</guid><description>I&amp;rsquo;ve recently written a small command line utility using Python 3.6 which will produce a CHANGELOG.md file from the commit differences between two different GitLab project branches. I&amp;rsquo;ve released this as an open source Python package and it&amp;rsquo;s available from PyPi here. Not intended to be a direct replacement for writing a manual changelog, the utility should be used as a draft upon which to build.
This was a small project to trial a few things; Python&amp;rsquo;s type hinting, which was added in PEP484; Facebook Open Source&amp;rsquo;s type checker Pyre; and Black &amp;lsquo;the uncompromising Python code formatter&amp;rsquo;.</description></item><item><title>Add a Flask Application to a Docker Container</title><link>https://stuartmccoll.github.io/posts/add-a-flask-application-to-a-docker-container/</link><pubDate>Sun, 14 May 2017 10:10:32 +0000</pubDate><guid>https://stuartmccoll.github.io/posts/add-a-flask-application-to-a-docker-container/</guid><description>Flask is a microframework for Python, based on Werkzeug and Jinja2. The core Flask framework is extremely lightweight, albeit infinitely extensible, and it&amp;rsquo;s simple for an experienced developer to pick up. I had been using Laravel a lot at the beginning of the year and Flask has been a breeze to work with in comparison. With it&amp;rsquo;s extensibility I haven&amp;rsquo;t been locked into working with pre-defined components either; I&amp;rsquo;ve used different database abstraction layers across multiple projects, such as Redis and PostgreSQL.</description></item><item><title>Quick and Dirty Kombu/RabbitMQ Application</title><link>https://stuartmccoll.github.io/posts/quick-and-dirty-kombu/rabbitmq-application/</link><pubDate>Sun, 14 May 2017 10:10:32 +0000</pubDate><guid>https://stuartmccoll.github.io/posts/quick-and-dirty-kombu/rabbitmq-application/</guid><description>Kombu is an open-source messaging library available for Python which aims to make messaging as simple as possible. Kombu provides a high-level interface for the Advanced Message Queuing Protocol (AMQP), an open standard protocol for message orientation, queuing, routing, reliability, and security. The most popular implementation of AMQP is the RabbitMQ open-source messaging server.
In the example application we&amp;rsquo;re going to create here, we&amp;rsquo;re going to use Kombu and RabbitMQ in combination to do the following:</description></item></channel></rss>