Fix Relative Paths in NodeJS Apps
Most NodeJS apps consist of hundreds of .js files which are included wherever needed using require. While this makes the dependencies of modules really obvious, most of the paths look like this in the end: const createUuid = require('../../../support/utils/create_uuid'); The problem is that by default NodeJS uses relative paths for local modules (not stuff that’s inside the node_modules folder). Not only does this look really strange, it’s also hard to read and if you ever want to move files around you have to fix all paths in your application to make it work again (and since this is lazily evaluated, you’ll probably miss some for code paths that are not tested).Move Docker Volumes using rsync
I’m running a Docker host on a Hetzner Cloud server. Since my GitLab instance grew quite big, I bought some additional storage that’s mounted to the machine as a additional device. All my Docker stuff uses local volumes located in /var/lib/docker/volumes. The question now was: How to move those volumes to the new storage? Docker volumes are basically just subdirectories in a special folder. For some applications it’s important to copy over all the extended attributes and other metadata like permissions, ownership and change dates.Creating a Fever API for Nextcloud News Part 1: Exploration / Mocking
In this series of screencasts I will create a Fever-compatible API layer for Nextcloud News, since I want to use this as my primary news reader. This API will be used to connect Nextcloud News to my Newsreader Apps on macOS and iOS. The API itself will be a separate application written in NodeJS that just uses the Nextcloud News database to query and write data. Later on I will probably create a Nextcloud App, but for now this series focuses on reverse engineering, functional programming and test-driven development in NodeJS.byeCloud: Hosting Notes with Nextcloud
Notes, besides photos, are the pieces of data I care most about. I want to review them even after years, have them available on the go and make sure I never lose them. Up until now, I stored my Notes in iCloud alongside Apples Notes app. This article is part of the byeCloud series in which I try to replace iCloud with self-hosted services. The Apple Approach To Notes Initially, I wanted to retain this app and thought of going with IMAP Notes, which is what Apple does: They basically devote one IMAP folder to a list of mails with special headers.Build a blog with Hugo I: Getting started
In this little series I’d like to show you how to set up a blog, or in fact any website, using Hugo, a static site generator written in Go. I’ve used many static site generators from Jekyll to Octopress but in the end I got stuck with Hugo. As a evidence for how awesome Hugo is you can have a look at this very site (just kidding), which is also built using Hugo.Install Ubuntu on FreeBSD with byhve (Update Ubuntu 18.04)
For some reasons I needed a Linux installation on my NAS. byhve is a lightweight virtualization solution for FreeBSD that makes that easy and efficient. However, the CLI of bhyve is somewhat bulky and bare making it hard to use, especially for the first time. This is what vm-bhyve solves - it provides a simple CLI for working with virtual machines. The only requirement seems to be VT-x CPU support or whatever it may be called on AMD CPUs and ZFS as a file system.Samba fileserver on FreeBSD (Update FreeBSD 12)
While building my new NAS, I came across the question how to install a fileserver based on Samba on FreeBSD. Here’s how…