Go vanity import URLs are useful tools for maintaining a consistent
import path for public Go packages, even if one changes code repository
location. In this article, I show how to set up vanity URLs in a website
built by Hugo and deployed on Netlify for Go packages hosted on a
third-party site such as GitLab or GitHub.
Time Machine, the built-in backup tool for MacOS, makes it relatively
straightforward to set up a network share to be a backup target for a
Mac computer. However, there are difficulties when trying
to use the same share to backup multiple Mac systems.
In this article, I highlight some of the issues and solutions
associated with more than one computer running Time Machine backing up
to a single network share.
I’ve started to use PhotoStation
on my Synology NAS device at home to organize my photos
and provide easy means to access remotely. I have been quite pleased overall, especially
with the integration with the DS Photo app which can sync photos from an iPhone’s camera
roll to the Synology NAS.
I was looking for an automated way to sort my photos into a hierarchy of folders by date.
Unable to find a built-in way to do this or any public documentation for the PhotoStation API, I
set about to explore the API and see what I could figure out.
Command-line completion is a helpful feature in many modern shells,
providing users with a helpful means of typing potentially complex commands
quickly and accurately. In this article I show how to add completion
to Go programs when run from the Bash shell.
Comments are a valuable tool for documenting and communicating
information about code. They are a common feature
in nearly every programming language and Go is no exception. However,
comments in Go programs can do far more than providing
information readers of the code.
In this article I will highlight some lesser known uses of comments
within Go that have special – almost magical – behavior.
At this year’s GopherCon,
Gabbi Fisher (@gabbifish)
of CloudFlare made a great presentation introducing her audience to the
complexities of network socket options in Go (archived video of her
presentation here). In her
talk, Gabbi details how to use the network socket option SO_REUSEADDR
to allow multiple processes on the same server to listen on the
same network port. Gabbi closes by mentioning the breadth of socket options
that are available beyond just her example. Inspired by her talk, I’ve decided
to write about the SO_PEERCRED socket option and Go.
Last year, Hugo introduced the concept of page bundles. Page bundles
give website authors a new way to organize all the resources (.md files, images, etc…)
of a page together. In this article, I show how I transitioned some of my existing posts
to use page bundles without changing the final website layout and appearance.
Many developers are familiar with the flag package from
the Go standard library. This package provides an easy method for adding command
line options and argument parsing for Go programs. What may not be as well known
is that flag can be used in Go unit tests as well.
One of the last steps to publishing my blog is to assign my custom domain name to it.
I previously acquired the domain jbowen.dev from Google Domains
and want to use that for my blog. This is supported easily by Netlify and this post
details how it can be set up.
Following part 1 and part 2
of this series, we have now set up hugo locally, created our first post and customized our theme to
match our desired appearance. Next step is to deploy our content to a webserver so it is accessible
to the outside world.
This is the second part of my blog feature on setting up a blog using
Hugo and Netlify.
In part 1, I discussed installing Hugo and
the Hyde theme and adding an initial post. We then used the hugo server
command to create a live version of the website to view locally. This post
will discuss various means on how to customize the appearance of the generated
blog.
This is the first of several posts that will discuss how to set up a new blog using Hugo and Netlify.
I will discuss the steps taken to create this blog and publish it to a custom domain.