Changing the default files and folders in the Nextcloud All-in-One Docker Image
Erratum Nextcloud is an open-source collaboration platform where teams can share files, calendars and other resources. When a system administrator creates a new user on Nextcloud, the default files and folders that user views on their initial login are automatically populated as part of the Nextcloud setup (e.g. a pdf file entitled Reasons to use Nextcloud, etc). As the administrator you may want your users to view a different set of files and folders; and if you have installed Nextcloud via the All-in-One Docker Image, this has to be done whilst navigating a docker container.
Vegaration: Visualising continuous integration using Github actions and vega-lite
Introduction vegaration (noun) [vay-gah-grey-shuhn]: The use of vega-lite to visualise continuous integration.
This is a worked example for Linux which aims to visualise the software development practice of continuous integration (CI). It uses GitHub actions to manage the CI workflow and vega-lite as the visualisation specification. Or to put it simply: every time someone commits to a repository on GitHub we can log elements associated with their commit (e.g. what tests passed, what tests failed) and then present this data visually using a popular suite of open-source metrics.
A no-tears guide to adding references in Groff
Introduction Groff is a decades-old typesetting system present on most Linux distributions which uses an application called refer to add citations. I found adding citations using this mechanism a challenge, therefore as an aide-memoire this is a minimal worked example of adding references to a Groff document with the refer program. I’m using GNU Groff version 1.22.4, GNU refer (groff) version 1.22.4 on Manjaro Linux 22.0.0. I’m using the ms macro, but the basic principles should apply to most macros.
Sprechen sie GraphSQLite? Or querying data in a SQLite database using GraphQL and Apollo Server
Introduction The website sqlitetutorial.net has some good pointers on using the SQLite database. This worked example builds on their Querying Data in SQLite Database from Node.js Applications tutorial. The differences being I’m using the better-sqlite3 rather than the sqlite3 npm package1 and I’m using a GraphQL API (powered by Apollo Server) to present the data (as opposed to console.log). As per the sqlitetutorial.net site I’m using the sample database chinook.db. This worked example is designed to mimic the tutorial as closely as possible - the queries and responses are almost exactly the same.
Introducing vim-groff-viewer: A vim plugin for displaying Groff files in a document viewer
Introduction I like (Neo)vim, I like Groff. So much so that I’ve blogged about letter writing in Groff before. What I don’t like is writing markup in Neovim, exiting Neovim, compiling Groff, opening a document viewer and then going back into Neovim to edit again. And repeat.
To remedy this my first vim plugin - vim-groff-viewer. It is probably easier to demonstrate, than explain, so…
Video demonstration Download, usage, configuration, etc Interested?
Look Ma, no Neovim plugin manager!
Handsfree To manually install a Neovim plugin, for example Tim Pope’s Commentary, without using a plug-in manager then at the terminal :
mkdir -p ~/.local/share/nvim/site/pack/tpope/start/commentary git clone https://tpope.io/vim/commentary.git ~/.local/share/nvim/site/pack/tpope/start/commentary The install path always follows the pattern of ~/.local/share/nvim/site/pack/foo/start/bar, where the variables foo and bar can be whatever makes sense to you. Commonly foo is the name of the author (e.g. tpope) and bar is the name of the plugin (e.g. commentary).
Linking to a heading in the same page in Hugo
Linking to another page in markdown in Hugo is easy: i.e. [Auntie Beeb](https://www.bbc.co.uk/) renders as Auntie Beeb - but when you want a link to a heading in the same page I can never remember, so this is a quick aide-memoire:
HTML In HTML a relative link to an element in the same page looks like:
<!-- <a> element links to the section below --> <p><a href="#Section_further_down"> Jump to the heading below </a></p> <!
Étoile du jour: Deploying a React Web App on the Microsoft Azure Cloud
Introduction Hosting a React framework Single Page Application as a Web App on the Microsoft Azure cloud can be an extremely frustrating process, for a number of reasons. To start with despite React being (rightly or wrongly) the most popular web framework, there are no specific instructions within the Microsoft documentation for how one might deploy a React Single Page Application (SPA) as an Azure Web App. Far worse however is that the choice of operating system (Windows or Linux) when creating a React web app on Azure is key - in short it is very difficult to use create-react-app to deploy to a base Linux O/S - yet this is both unintuitive and seemingly undocumented (see the What’s up with Linux?
A concrete Python 'Hello World' with the Neovim API
Neovim’s API is typically called through a Remote Procedure Call (RPC) using the MessagePack-RPC specification. The neovim documentation provides a ‘Hello World’ example of how to interface with the Neovim API; this post is a worked example of how to implement this - more of a note to self than anything else. I’m running Neovim v 0.6.0 on Manjaro 21.2.0 Qonos linux.
First we need to determine the servername that Neovim has set on startup.
Groff and the art of letter writing
Introduction Although I’ve blogged previously about using LaTeX for academic writing I wanted to try groff out for the less complicated task of letter writing - groff being similar to LaTeX but far less popular. Using a typesetting system such as groff instead of word processing software has several advantages: saving documents in plain text is memory efficient, easily searchable and scores highly for digital preservation (proprietary word processing file formats tending to eventually obsolesce).