Moving a Hugo Site from Netlify to Cloudflare Pages

How to migrate your Hugo blog from Netlify to Cloudflare Pages.

I had already finished the move from Netlify to Cloudflare on my other blog, and since the summer holidays gave me some time, I did the migration on this site too. It was almost the same work as the migration on the other blog, so I was able to move over fairly easily. Github To link it with Cloudflare, set the repository in question to allow the integration. [Read More]
Categories: Network  Tags: CloudFlare gitlab netlify github 

Suddenly Denied on macOS! Fixing a Samba Access Error

How to Fix Unexpected Samba Access Denied on macOS(Sonoma)

When I tried to connect from macOS to a QNAP’s Samba share for the first time in a while, for some reason I was denied and could not log in even though I was entering the correct password. For reference, the macOS here is the latest Sonoma environment. Investigation Logging in from Windows works fine Logging in over afp works fine Logging in from older macOS (High Sierra or Mojave) works fine too How to fix it Either method is fine as long as it solves the problem [Read More]
Categories: mac  Tags: samba network sonoma 

Enabling NVIDIA GPU Support in Docker with nvidia-container-toolkit

Step-by-Step Guide to Leveraging GPU Power within Docker Containers

TL;DR To answer the request to use a GPU (nvidia) inside a Docker container, Docker has to be configured for GPU support. Normally a Docker container cannot access the host’s GPU resources. That is because Docker does not pass the host’s GPU devices through to the container, and the reason behind it is that the GPU driver and the CUDA libraries are not properly shared between the host and the container. To get around this, the GPU resources have to be passed through to the container with a tool such as nvidia-container-toolkit. [Read More]
Categories: docker  Tags: GPU nvidia 

A CLI Command That Only Updates Neovim Plugins

Just a command to update the neovim plugin

I only just learned the command that updates plugins in a Neovim (Vim) setup that uses vim-plug.

Until now I opened nvim, opened the : command window, and typed :PlugUpdate.
That is fine for a single machine, but repeating the same steps on several hosts is tedious.
It turns out you can run it from the command line as well.

$ nvim +PlugUpdate +qall

With this, you can drop it into a script or an Ansible playbook.

Categories: editor  Tags: neovim vim-plug 

Getting an author Warning When Hugo Builds the Site

The author key in site configuration is deprecated. Use params.author.name instead

The following error started appearing when building with hugo

Start building sites …
hugo v0.122.0-b9a03bd59d5f71a529acb3e33f995e0ef332b3aa+extended darwin/amd64 BuildDate=2024-01-26T15:54:24Z VendorInfo=brew

WARN  The author key in site configuration is deprecated. Use params.author.name instead.

Apparently the warning started being emitted from version 0.120

Fixing config.toml

  • Before
[params]
  author = "Hugo"
  • After
[params]
  author.name = "Hugo"

If there is no author inside [params], add it

Categories: Hugo 

Getting UNIX-Style Focus Follows Mouse on a Mac with AutoRaise

Enable UNIX window autoraise(focus) on Mac

Ever since I started using a Mac, I kept wishing there were a feature like the one on Unix where simply moving the mouse cursor onto a window makes it active. It is late in the day, but I finally came across a piece of software with a Focus Follows Mouse feature (AutoRaise). Installing AutoRaise The installation instructions offer a disk image, a Zip file and manual compilation, but the disk image was not supported, so I go with manual compilation from Git. [Read More]
Categories: Mac  Tags: Software 

How to Exclude Files and Folders from Resilio Sync with IgnoreList

How to sync ignore resilio sync

Until a few years ago I had sync configured across several PCs with Dropgox, but a change for the worse in Dropbox put a limit on the number of devices, so these days I use Resilio Sync to keep my PCs in sync. Lately I have been using node-based tools such as React and Git frequently, and if I keep those working directories inside a Resilio Sync folder, an enormous number of files get synced. In particular, I do not want the contents of node_modules produced by node builds, or the git management folder, to be synced, so - late in the day though it is - I began to wonder whether Resilio Sync has an exclusion setting. [Read More]
Categories: Linux Mac  Tags: Software 

Adding an HDD on Debian and Formatting It with xfs

how to add hdd and format it with xfs on Linux(Debian)

In Linux environments I often have occasion to add an HDD after the fact, so I am writing it down again. (About ten years ago I posted a similar article (adding an HDD with fdisk from the command line (in Japanese))) Environment The Linux used is Debian 12 The format is xfs The HDD to be added is 4TB I assume Linux (Debian) is already running and the HDD to be added is already installed [Read More]
Categories: Linux  Tags: debian 

Fixing network.external.name is deprecated in Docker Compose

howto configure network.external.name on docker

When I rebuilt and started, for the first time in a while, a container that uses external in order to communicate between containers in different Docker environments, I ran into the error below Copy network default: network.external.name is deprecated. Please set network.name with external: true The docker-compose.yml I had been using until then worked with the following Copy … networks: default: external: name: ${NETWORK} The compose version has gone up and the way it is written seems to have changed, and the format below is apparently the correct one [Read More]
Categories: docker 

Upgrading Debian 11 bullseye to Debian 12 bookworm

How to upgrade Debian 11 to 12

I have written about Debian upgrades several times, so this update is almost the same work as the previous Upgrading Debian 10 to 11 .

The only difference is a small change to sources.list when adding non-free.
After main in each repository stanza of /etc/apt/sources.list, add non-free non-free-firmware.

#deb cdrom:[Debian GNU/Linux 12 _Bookworm_ - Official Snapshot amd64 LIVE/INSTALL Binary 20230610-08:51]/ bookworm main non-

deb http://ftp.riken.jp/Linux/debian/debian/ bookworm main non-free non-free-firmware
deb-src http://ftp.riken.jp/Linux/debian/debian/ bookworm main non-free non-free-firmware

deb http://security.debian.org/debian-security bookworm-security main non-free non-free-firmware
deb-src http://security.debian.org/debian-security bookworm-security main non-free non-free-firmware

# bookworm-updates, to get updates before a point release is made;
# see https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_updates_and_backports
deb http://ftp.riken.jp/Linux/debian/debian/ bookworm-updates main non-free non-free-firmware
deb-src http://ftp.riken.jp/Linux/debian/debian/ bookworm-updates main non-free non-free-firmware

As an aside, a direct jump from 10 to 12 failed in my case, so when upgrading from an older release it is safer to go in order (10→11→12).

Categories: Linux  Tags: Debian