Posts

How to customize nginx config in a docker image

When hosting websites with docker (and proxying via Caddy), I often need to tweak the nginx config. This how-to guide will walk you through the steps you can take to accomplish this. 0. Setup For this tutorial, here’s my setup: Dockerfile FROM nginx:alpine COPY public/ /usr/share/nginx/html The Dockerfile is in source code directory and we have another directory called nginx where we can store customized config files. Build image:

Enable git over ssh

Have you ever watched video where developer securely clone their git repos without entering a password and wondered how to set that up? Well, it’s quite simple and I’ll walk you through the steps. This approach uses ssh keys to authenticate and then the sync occurs over ssh tunnels, encrypting the traffic. Setting up ssh keys is simple and you’ll no longer have to type in a username and password.

Simple double opt-in web app for Postmark mailing list

If you’re using an email service like Postmark, you’ll have to handle your own list management except unsubscribes and suppression (e.g. from hard bounces). To do this, a little web app will be needed if you want to do things like double opt-in (good idea). You’ll likely then want more features like profile management but the goal of this howto is getting a simple and hopefully secure webapp in place for /subscribe and /confirm (you can get unsubscribes/suppressions from Postmark via web-hooks or an API call).

Hugo no existing content direction configured

If you receive ‘Error: no existing content directory configured for this project’ from hugo when adding new content, there’s a simple fix. This post will walk you through the steps to resolve the error.

Building a simple HN reader for iOS with GitHub Copilot, Part 7: Reimport code

In the series, I will build a simple Hacker News reader for iOS using Firebase, SwiftUI and GitHub Copilot X. In part 7, I reimport my code after properly setting up my GitHub repo and GitHub Actions: Using GitHub Copilot Chat for help on git branches Create and checkout a new git branch Copy previous code over Install Firebase SDK for iOS Forgot to save our source control previously working code!

Building a simple HN reader for iOS with GitHub Copilot, Part 6: Configuring GitHub Actions

In the series, I will build a simple Hacker News reader for iOS using Firebase, SwiftUI and GitHub Copilot X. In part 6, I use GitHub Copilot X to automate security and privacy testing on each pull request using GitHub Actions: GitHub Actions plan for automated build and security scans GitHub Action to build and scan iOS app - static only Use GitHub Copilot to help write a GitHub Action Dynamic security scans on pull requests or new releases Thoughts on GitHub Copilot X results for GitHub Actions 1.

Building a simple HN reader for iOS with GitHub Copilot, Part 5

In the series, I will build a simple Hacker News reader for iOS using Firebase, SwiftUI and GitHub Copilot X. In part 5, I use GitHub Copilot X to tackle the following: How to use Copilot, VSCode and Xcode together Create new GitHub repo Create new Xcode iOS app project Commit new project to repo using VSCode terminal 1. Xcode + VSCode & GitHub Copilot Currently, Xcode does not have native support for GitHub Copilot.

Building a simple HN reader for iOS with GitHub Copilot, Part 4

In the series, I will build a simple Hacker News reader for iOS using Firebase, SwiftUI and GitHub Copilot X. In part 4, I use GitHub Copilot X to tackle the following developer housekeeping tasks: Add Swift LSP support in VSCode Enable vim bindings in VSCode How to run a terminal in VSCode Thoughts on GitHub Copilot Chat for developer house keeping 1. Housekeeping tasks All of these housekeeping tasks were pretty simple (install extensions and keyboard shortcuts) but I didn’t know if GitHub Chat was only for coding related questions or broader.

Building a simple HN reader for iOS with GitHub Copilot, Part 3

In the series, I will build a simple Hacker News reader for iOS using Firebase, SwiftUI and GitHub Copilot X. In part 3, I use GitHub Copilot X to tackle the following: Automatically update NewsView from TopStoriesModelView Incorrect prompts for Firestore rabbit hole Successfully connect to Hacker News Firebase API Successfully retrieve top stories Use Copilot X to refactor code and add nil handling As I mentioned at the end of Part 2’s write up, at this point I was not aware that the suggested Firestore database connection was incorrect.

Building a simple HN reader for iOS with GitHub Copilot, Part 2

In the series, I will build a simple Hacker News reader for iOS using Firebase, SwiftUI and GitHub Copilot X. In part 2, I use GitHub Copilot X to tackle the following: Model files for Stories and TopStories Code for TopStoriesModelView Use Copilot Chat to resolve “Cannot find Firestore in scope” error 1. Story model generated by Copilot Here’s the prompt and resulting model file GitHub Copilot X generated for a Hacker News story: