Posts published by: Alejandro Liu

QNAP Snapshots

I wrote a small tool to access QNAP snapshots from the Linux command line.

Pre-requistes:

  • Snapshots have to be enabled
  • You need a /share/netcfg containing the file:
  • In my case, I set this share as read-only with root-squash.
  • `admin.yaml' : contains the private/public keys and the configuration of …

Docker on Void

This is a quick recipe to run Docker on void:

  • Make sure your system is up-to-date:
  • sudo xbps-install -Syu
  • Install docker executables:
  • sudo xbps-install -S docker
  • Check if docker was installed properly:
  • docker --version
  • Enable services:
  • sudo ln -s /etc/sv/containerd /var/service
  • sudo ln -s /etc/sv/docker …

Home Assistant Behind Reverse Proxy

To set-up a reverse proxy I took the following steps:

  • configure DNS
  • get Letsencrypt certificates
  • Configure NGINX
  • Configure Home Assistant to trust the proxy

At the time of this writing I can't really confirm if the reverse proxy configuration for home assistant is working as I can't tell what IP …

Looking up docker image tags

This recipe is to check the tags defined for a specific Docker image in docker.hub.

The basic API is at https://registry.hub.docker.com/v2

So the format is as follows:

https://registry.hub.docker.com/v2/repositories/{namespace}/{image}/tags/

Where:

  • namespace : usually is the user account …

Home Assistant Large Clock

This recipe is my version of providing a "large clock" face in the home assistant dashboard.

Enable serving local static files:

  • Create directory www in your config directory.
  • Restart home assistant.
  • Static files are now available as http://homeassistant.local:8123/local/.

Place the HTML with your clock in a …

Moving to Home Assistant

I am busy moving away from my VeraEdge installation to a Home Assistant running on a Raspberry Pi 4. This is because it looks like the maker of the VeraEdge was bought and it is slowly being phased out.

For this I am using the following parts:

cuylib

This is a tiny library to implement Web server embedded editor.

You can find it in github.

Can be used either from haserl or directly from a shell script.

Features:

  • Uses codemirror
  • Escaped HTML entities (html_enc)
  • Decode URL escaping (url_decode)
  • Read POST form data (post_data)
  • Parse QUERY_STRING (query_string and query_string_raw …

voidlinux virtualization

This recipe is for setting virtualization on a voidlinux desktop.

Use this setup script to set things up on void linux.

Connecting to libvirtd

Note that virsh and virt-manager commands connect to different libvirtd sessions by defauult.

virsh defaults to qemu:///session while virt-manager to qemu:///system.

It is better …

A couple of useful sites for development

Unicode

Can be useful for looking up unicode code points. Particularly useful for looking up accented characters. Another interesting use is for UI graphics characters.

gist-hkan

This can be used to look-up emojis and shortcode for emojis.

color picker

Let you visually select a color so that you can paste …

Keyboard Mouse control

This comes in handy when working at a colo or someplace where you don't have a mouse and then find yourself needing to use X11. Press the following key combo:

Ctrl-Shift-Numlock

Now you can control the mouse pointer using the number pad. The key bindings are:

Move the mouse pointer …