TekOnline

Author: jcianci12

  • Python, Flask and the dreaded error: No module named ‘imp’

    When trying to run a flask application under vscode, dev container, python 3.12.7 64 bit, I started getting these errors: After lots of non helpful answers (at least not for me!) I stumbledacreoss this: https://github.com/microsoft/debugpy/issues/808 Turns out this really helpful comment solved the issue for me! https://github.com/microsoft/debugpy/issues/808#issuecomment-1006990063 Flask has its own built-in debugger, which IIRC…

  • Avoiding Syntax Errors with the Conditional Operator in C#

    I was having a strange bug in my code, everything looked right, but for some reason, it just wouldn’t work as expected. I had written a simple conditional statement using the ternary operator, but it kept throwing a syntax error. I scratched my head, wondering what could be causing the issue. The code in question…

  • Two-Way Data Binding with Dates: A Common Gotcha

    I was having issues getting dates to bind. I realised that when the data came down as a string, the data binding worked fine, but when it came down as a date object, the binding failed. At first, I thought it was a problem with my Angular code, but it turned out to be a…

  • Getting HTML Datepickers to Display Bound Data Correctly

    I was trying to get a HTML datepicker to show the underlying data that it was bound to, but was running into issues with the date format. The datepicker would display the date as a string in the format YYYY-MM-DD, but my backend API expected the date in the same format. I needed to ensure that…

  • Pulling a Close Button to the Right in Bootstrap 5

    I was wanting to pull a close button to the right in Bootstrap 5 recently. After some research and experimentation, I ended up finding that the text-end class is a lifesaver for this! You can even include it in the same class as the col class! Bootstrap 5 provides a variety of utility classes that make aligning elements straightforward.…

  • Taking Control of Notifications with Home Assistant

    I was getting a bit tired of getting non-stop notifications when I was mowing the front lawn. So I decided to create a toggle in Home Assistant that would pause notifications for 15 minutes. The first step was to create a button helper in Home Assistant, which would serve as the toggle switch to pause…

  • Converting B6T images to ISO images.

    I downloaded some old abandoned software the other day, and one of the disk images was in the b6t format. I had no idea what that format was, but I was determined to get the software up and running. After some research, I found that b6t is a proprietary disk image format used by some…

  • Getting Plex Up and Running with a Windows Share on Ubuntu

    Okay, so my Portainer container was up… First port of call, get Plex up! My Plex media is actually stored on a Windows share. Here’s how I got it working. As a media enthusiast, I rely on Plex to stream my favorite shows and movies to my devices. However, my media library is stored on…

  • From Scratch to Dev Ready: Setting up a New Ubuntu Server with VSCode

    My trusty Ubuntu server has been running for a few years now, and it was a guinea pig for all my crazy ideas and lack of experience, so naturally it filled up with junk. I wanted to get a new one up and running, with the following essentials: Portainer, Docker, and Tailscale. In order to…

  • Drive Space Cheat Sheet for Linux/Ubuntu Machines

    I find myself forgetting syntax when it comes to checking drive space and freeing space, here is a handy cheat sheet you hopefully will find handy for finding and cleaning up old data from your Ubuntu machine. Note! Whenever cleaning up, take a backup first! Checking Drive Space Finding Large Files and Directories Freeing Up Space…