Danny

I'm Danny.
This is an unsorted list of my ramblings and a small collection of my unfiltered thoughts.

Replacing Google Photos with Immich

・3 min read
I have, for a long time, been looking for a better alternative to Google Photos. Although Google Photos does exactly what I want, and isn’t that expensive, I do often consider the fact that all of my photos are in Google’s hands. I did move to Synology Photos a few years ago. The move itself was straight forward enough, but the user experience leaves quite a lot to be desired. Read more...

    2024 macOS Dotfiles

    ・2 min read
    It is the time of year again where I decide to update my local computer configuration, as well as any remote linux server(s) that I am maintaining. I really appreciate having a familiar prompt and alias setup whenever I login to any of my servers/workstations. As per usual, I cannot remember which specific packages and plugins I use; so I’ve am using this post for future me to discover how I actually configured my environments. Read more...

      Running Powershell Script an Elevated User

      ・1 min read
      When running a powershell script, I often find I need to run the script in an elevated prompt. The nature of my job is that often these scripts will be run by people that don’t really know what Powershell is. I have found it quite useful to first create a bash script that the user executes, which in turn calls the actual Powershell script as an elevated user. To keep this handy, I’m posting it here for future me. Read more...

        Extending Unraid VM Storage

        ・1 min read
        More and more I find myself quickly spinning up a new Windows VM on my unraid server. It is always a ‘temporary’ VM which, after setting up exactly how I like, I invariably then wish I’d set a much larger virtual disk size. The standard VM disk size is 30G and that always seems to be enough. Fast forward an hour or two and I really wish I had set something more realistic. Read more...

          Tmux exit current session, not Tmux itself

          ・1 min read
          When accessing remote servers that I am responsible for, I always initiate a tmux session along with the SSH session. This means I am always in a tmux session and I will never forget to start a tmux session manually. There is something particurly frustrating about starting a process on a remote server only to realise that you I forgot to start a tmux session and the process is going to take > 1 hour. Read more...

            Hetzner Installimage & Ubuntu

            ・4 min read
            I finally had chance to get a dedicated server at Hetzner for my own projects and use. No client requirements, no deadlines and no specification requirements. Seems like a simple thing but just about every ‘proper’ server I have ever worked on has been for a client or work project. Now that I had access to my own server, it was time to configure it exactly how I wanted. As usual, I decided to use Ubuntu - I’m familiar with it and I really don’t mind the bloat that could be avoided with the likes of CentOS or Arch. Read more...

              Tmux 3.0a Configuration Not Loading

              ・0 min read
              The latest version of Ubuntu has recently been released (20.04 LTS) and along with it comes the latest version of tmux. Tmux is now at release 3.0a and this version is pre-installed with Ubuntu 20.04 LTS. The problem is, when you want to import a tmux configuration file from tmux 2.9 or below, you get many errors. The fix for me was simple… tmux kill-server Once I killed all old sessions and stopped the tmux server the new tmux version loaded the existing configuration file without any issue or errors. Read more...

                Booting Raspberry Pi 4 From USB

                ・3 min read
                I recently purchased another Raspberry Pi 4 but this time I wanted to use Ubuntu 20.04 and I wanted to use a USB 3 1TB external hard drive as the boot disk. The reason for using a large boot disk is mainly to avoid SD card corruptions in future as all read/writes (once booted) will be on the external USB drive not on the SD card. The first step is install Ubuntu 20. Read more...

                  Starting Tmux Automagically When Connecting to SSH

                  ・1 min read
                  I recently noted in a blog post that I use a short snippet to either connect to an existing tmux session when I start a new SSH connection, or create a new tmux session if an existing one doesn’t exist. The problem is, I have been using Termius more often than not recently and using the snippet feature as mentioned in the previous blog post. I needed to make this work within a normal terminal today and thought I would add the snippet as a blog post so I don’t forget for next time. Read more...

                    Flash Teckin Smart Plug for Home Assistant

                    ・4 min read
                    I have been using Teckin smart plugs around the house for quite some time now. They’re really handy as they integrate with Google Home via the Smart Life app ecosystem. This means that each night we can tell Google to “turn everything off” and our lamps all switch off at the wall socket. What I have wanted to do for some time, after seeing my friend do it with great success, was to flash the Teckin firmware to esphome so that I can control the sockets via Home Assistant and also get realtime values for the socket’s watt, amps and voltage loads. Read more...

                      Customise Remoteapp Work Resources Name

                      ・1 min read
                      When using RemoteApp on Microsoft Server 2016 I noticed that whenever you add the RemoteApp workspace feed to iOS or iPadOS devices, the resources are listed under ‘Work Resources’. Although this works perfectly, it becomes a problem when you connect to different RemoteApp servers and they are all titled ‘Work Resources’. The solution is simple and takes about one minute, assuming you don’t use an RDP gateway - if you do, it take a minute or so longer, that’s all. Read more...

                        Mikrotik Failover Netwatch

                        ・2 min read
                        Over the years I have used many different methods of failover for primary to secondary, sometime tietary, wan links on Mikrotik devices. Along with manual routing table entries, I have always relied on scripts of some sort that are triggered when one of the WAN links goes down. I have had varying success with this approach. One of the biggest problems I have had when switching from a primary WAN to a secondary WAN is the registration of VoIP phones seems to hang. Read more...

                          Tmux Create or Join

                          ・1 min read
                          I have been using tmux as an alternative to screen for a couple of years so far. It works very well and I very quickly got used to the shortcuts for it - especially after changing the shortcut key to CTRL + A. One thing that I wanted to do was ensure that I was always in a tmux session. There’s little worse than running a command that is going to take some time but realising that you’re not in tmux session and you can’t quit the SSH session until the command completes. Read more...

                            PiVPN DNS Name

                            ・1 min read
                            I have used PiVPN for many projects over the past few years. It makes setting up a VPN gateway really easy and now supports Wireguard as well as OpenVPN. I have started using it more often since they added the ability for it to be installed on a vanilla Ubuntu installation, it no longer needs to be run on a Raspberry Pi. One of the problems I have come across a few time with PiVPN is when the public IP address of DNS name of the VPN gateway changes. Read more...

                              Using SIP on Cisco 7906G Handsets

                              ・2 min read
                              After a lot of trial and error getting a test Cisco 7906G handset working with an Asterisk PBX I thought it would be useful to make a note of the configuration options I used and the files that finally worked. They are all hosted on [GitHub]https://github.com/dannymcc/Cisco-7906G-SIP. TFTP/DHCP Configuration During boot the handsets will discover the TFTP server via DHCP option 66 and/or DHCP option 150. For this example I set option 66 of our VoIP VLAN to the local IP address of our TFTP server. Read more...

                                Converting and Moving a file using a simple bash script.

                                ・1 min read
                                I recently needed to receive .txt files from a laboratory analyser, convert it to PDF and then transfer it to a local SMB share - but - the analyser results text file has to be over 30 minutes old before the whole process begins. Once the file has been converted, it needs to be deleted from the analyser server sl that it doesn’t fill up the local hard drive. The analyser server in this instance was a Raspberry Pi 3 B+ with a LAN connection. Read more...

                                  First Post

                                  ・1 min read
                                  This is the first post of this new blog. I have made many blogs over the years and not one of them lasts more than a few weeks, or in some cases, days. My aim is to use this as a unified location for everything that I want to remember in the future. Let’s see how that goes… It’s entirely possible that this blog will not be updated very often, but, I hope it is. Read more...