Category Archives: How to’s

Step-by-step guides mostly for general public.

Postgres database on a separate drive

In psql: CREATE TABLESPACE mytablespace LOCATION ‘/Volumes/MyVolume/postgres’; CREATE DATABASE mydatabase TABLESPACE mytablespace; Kudos to GregHNZ for posting this on StackOverflow.

Posted in How to’s | Tagged , | Leave a comment

Django + Vue CLI + Webpack demo

How to wire up a Vue CLI app and Webpack to Django templates with routing, hot reload, code-splitting and without any extra plugins (a minimal demo + explanation).

Posted in How to’s | Tagged , , | Leave a comment

VS Code: bind one key to multiple commands without an extension

People wanting to assign multiple commands to a single keybinding in VS Code typically use an extension, such as multi-command or macros. However, there is another, lesser known method to achieve this using built-in functionality of VS Code — user … Continue reading

Posted in How to’s | Tagged | 1 Comment

Datadog: nginx access.log / error.log permission denied

Problem:

Posted in How to’s | Tagged , | Leave a comment

Datadog: “could not retrieve nginx version info”

Apparently Datadog fails to retrieve nginx version information when server_tokens directive in nginx configuration is set to off.

Posted in How to’s | Tagged , | Leave a comment

Apache Guacamole: how to change the default URL path (/guacamole) to something else

Say you want to change Apache Guacamole’s URL from http://server:8080/guacamole to something like http://server:8080/my-hidden-guacamole-instance (or perhaps you’re using nginx to proxy requests to Guacamole / Tomcat and you don’t want any path at all).

Posted in How to’s | Tagged | Leave a comment

Downgrade any Homebrew package easily

Update from 2020: the instructions for tesseract don’t work anymore, see comments from other users below the post. I’ll use Tesseract as an example, but the same logic can be applied to any other Homebrew package.

Posted in How to’s | Tagged , | 12 Comments

Make tojson filter in Jinja2 output Unicode instead of escape sequences

This wasn’t documented anywhere, but kudos to the Jinja2 devs for making this so easy to figure out from the source code.

Posted in How to’s | Tagged | Leave a comment

Fixing Windows Update: what to do when wuauserv refuses to stop

Every now and then my virtualized Windows 10 would stuck at “Checking for updates” or “Downloading updates: 0%”. The solutions on various websites suggest stopping the related system services (net stop wuauserv and net stop bits) and trashing the contents … Continue reading

Posted in How to’s | Tagged | Leave a comment

How to load VirtIO storage drivers in Windows System Restore

If you need to load VirtIO block storage driver (aka viostor) in Windows System Restore (aka Windows Recovery Mode) to recover your Windows virtual machine, take the following steps. (Also please read my note below).

Posted in How to’s | Tagged , | 1 Comment