Star Trek or Star Wars – Binary Classification using ML.NET
I have been looking for an opportunity to try out machine learning and recently had a change. Given my background with ASP.NET, using ML.NET seemed the clear choice as I am already familiar with C# and the .NET ecosystem. To try out ML.NET, I decided to make a binary classifier which would accept a piece of text and decide if the text is most likely to be related to Star Trek or Star Wars. Not that I am saying one is better (or worse) than the other. Finding the Data The first step with any
Read more...Using Azure SignalR Service in Static Web Apps (SWA) Managed Functions
I recently migrated my YouTube Remote project from ASP.NET 4 to use serverless computing, such as Azure SignalR Service and Azure Functions with Static Web Apps. This aim of the YouTube Remote is to have a “display” which shows a YouTube video, and a “remote” to have play and pause controls. The remote could be a different browser window, or an entirely different device such as a mobile phone. In the ASP.NET 4 Web App version of the project, all the communication between the display and remote
Read more...GitHub Importer - There was an error pushing commits to GitHub
I was recently trying to import some repositories from GitLab to GitHub, and kept receiving an error the title "We found an error during import" and message "There was an error pushing commits to GitHub." This is a pretty generic error message and didn’t give me much to go on to start figuring out why the GitHub repository import process was failing. I started to wonder if the username and password (or access token) combination I had provided was incorrect, but they worked when cloning the repo
Read more...Using Ghost as a Headless CMS with Static Site Generator and Deploying to Cloudflare Pages
Most blogging websites are powered by server-side software such as Ghost or WordPress. This is extremely useful since they can support complex post editors, schedule posts to be released later, and allow users to register on the website. I self-host Ghost in a dedicated virtual machine, but this mean that I have no redundancy and if I have to do a reboot of the virtual machine for updates it results in my blog content being unavailable for a few minutes. Eventually, I decided I wasn’t happy wit
Read more...Setup Gitpod for a .NET 6+ Web App
Gitpod is a service which provides development environments in the cloud, but a .NET web app will need some extra configuration to make it accessible when running from a development workspace. You can use Gitpod by logging in with an account from a source control provider (such as GitHub or GitLab), and then selecting the repository you would like to use from the list of available repositories. After you have selected a repository, a new workspace is created and the files will be cl
Read more...Protect Microsoft SQL Server with a Cloudflare Tunnel and Cloudflare Access
Microsoft SQL Server is a database server engine used in a wide variety of organisations for storing their data. Sometimes, it can be necessary to provide access to this data from remote locations (such as to remote workers, or to services running in remote locations). A Cloudflare Tunnel when combined with Cloudflare Access can provide secure access to a Microsoft SQL Server instance without requiring any ports to be opened or a VPNs to be configured. Introduction In this post, I am goin
Read more...Setup GitPod for Vue.js Development
GitPod is a cloud-based development environment which can be used to work with a variety of frameworks, including Vue.js. It is designed to be quick to spin up new instances of a development environment through automated scripts. One of the advantages of this is that it reduces the chance of encountering issues due to differences in environments, and ensures everyone has the tools they need to start working on a project quickly. However, I recently encountered a few issues when attemptin
Read more...Will WebAssembly (Wasm) replace JavaScript?
Ever since JavaScript was created in 1995 it has formed a key part of providing interactive experiences on websites. However, since WebAssembly (Wasm) support is now available in major browsers, will it be able to hold out against the competition, or will WebAssembly replace JavaScript as the essential tool for client-side development on the web? I think there are several factors that will drive or slow developers to adopt WebAssembly as a JavaScript replacement. These are, the current l
Read more...Duplicate Validation Messages with FluentValidation in ASP.NET Core 6 MVC
Validation is an important step when handling data from a request in ASP.NET Core 6. FluentValidation is a popular .NET library which can make validation your models easier. It allows you to define your validation rules in a single place and integrate custom logic for your validation, which would require you to make a new filter if you used data annotations. However, in ASP.NET Core 6 MVC there was a change in the project template that could result in seeing data annotation produced vali
Read more...Install a Self-Hosted VPN with PiVPN on a Raspberry Pi
The Raspberry Pi is a very useful and versatile computer you can use to host and run a variety of services from your own home. An example of this is Pi-hole which allows you to implement network-wide ad-blocking for all your devices. However, when you’re away from your network (for example on a mobile device or laptop) you won’t get the benefits of this ad-blocking. You also won’t be able to connect to other services running on your network. PiVPN can help with this by allowing you
Read more...