A few years ago, I published a post about creating a docker bot. A lot of fun learnings went into that post, but it’s been 4 years and I went down the rabbit hole of making another discord bot from scratch. So I figured, if it’s time for a new bot, it’s time for a new blog post. We’re still leveraging the discord.js
package, but with new ways of doing things and a new hosting model.
I’ve recently found myself in a situation where I’m calling APIs that return a collection of items in pages. Especially when calling OData APIs (looking at you Microsoft Graph). Usually these come in the form of a response model that wraps the array of items and a continuation token, or a next link. Something like this:
Since I built this blog using GitHub pages with Hugo, I thought I’d share the process I used to automate the build and deployments. GitHub pages can only serve static sites, so the only two options are to publish all the HTML/CSS/JS files to a branch or use a Jekyll theme (which GitHub has native support for). These are both great options, and I’ve used both in the past, but I really like how Hugo’s site generation and content system works.
Sometimes when working with Asp.Net MVC or Web Apis, you’ll want to add a Filter Attribute to a class or an endpoint. This can be an Authorization Filter, a Resource Filter, an Action Filter, etc. A common use case I have seen is adding a custom Authorization Filter. In this post, I’ll go through some of the issues I’ve run into while trying to add Dependency Injection to a Filter.
Ever want to make a Discord Bot and have no idea where to get started? Yeah me too. So I spent most of a night looking into making one and setting it up in a Docker container. Some people thought it was an interesting idea, so here’s a write up. This post might get a little long, so I may split it up into a couple of posts.