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 …

flatpak

Flatpak is a utility for software deployment and package management for Linux. It is advertised as offering a sandbox environment in which users can run application software in isolation from the rest of the system. Flatpak was developed as part of the freedesktop.org project and was originally called xdg-app …

My git release script

I always had issues remembering how to create releases. So in order to standardise things, I wrote this script:

So whenever I am ready to release I would then just issue the command:

./ghrelease vX.Y.Z

Pre-requisistes:

You obviously need git. But also you would need github-cli.

Your …

Linux Icons

A quick note on how to add icons to menus in a Linux desktop.

  1. Create the icon image in: /usr/share/pixmaps.
    • png and svg (and maybe others) are supported.
    • 24x24 seems to be a good size for menus.
  2. You need to create a .desktop file in /usr/share/applications …

lnbin

This is my lnbin script.

This is a program for managing symlink in a /usr/local/bin directory. It is similar to stow, lndir, cleanlinks and others.

The approach used by lnbin is based on Stow, and it is to install each into its own tree, then use symbolic links …

nas ops cmd

This is my op script.

This is stupidly simple script to elevate priviledges in order to manage NFS shares on my QNAP NAS.

The idea is that NFS shares do squash-root so admin access is disallowed through NFS. This gives a convenient way to issue root level commands without using …

Graphviz markdown extensions

I have enabled several extensions to my pelican website.

One that I wanted to include was graphviz. So, I searched for one and while I found a few, they somehow, did not work for me.

So I wrote my own: mdx_graphviz.

It is quite straight forward. You just need to …