hakk

software development, devops, and other drivel
Tree lined path

Blog

Streamlining Deployment: Installing Docker, Gitea, Gitea Act Runner, and Nginx on Ubuntu

Learn how to setup a robust source control system with CI/CD to deploy your applications on Ubuntu. This post will guide you through the process of installing Docker, Gitea, Gitea Act Runner, and Nginx on Ubuntu, empowering you to streamline your deployment workflow and enhance your server capabilities. Installing Docker on Ubuntu Docker provides a powerful platform for containerizing applications and simplifying deployment across different environments. To install Docker on Ubuntu, follow these steps: Read more...

How to Filter HTML Table By Multiple Columns

TL;DR: The full code is available at the bottom of this post. Let’s walk through building the whole page starting with the HTML. HTML Structure: First we’ll create a text input field that will be used to accept input to search on. We’ll also give it an id attribute set to "myInput", which is used to identify it in JavaScript later on. <input type="text" id="myInput"> Next let’s add a table and add an id attribute set to "myTable", which will also be used to identify it in JavaScript later. Read more...

Using a Kubernetes Configmap in a Pod

A ConfigMap is provided as a way to inject configuration data into a pod/pods. It can be included as files or be used as environment variables. Below are a couple of examples of mounting a configmap using both methods. Use as File In this first example I’ll show how to create a configmap and mount it using the key(s) as filenames and the data as the file content. It will then be used in an Nginx container as the index page. Read more...

CentOS 9 Automated KVM Install Using Kickstart

A quick demo using virt-install and Kickstart to provision a new CentOS 9 virtual machine. This uses KVM (Kernel Virtual Machine) and libvirt to manage the VM. And uses Kickstart to setup and install the new system within the virtual machine. Creating kickstart file I’m going to post my Kickstart file on GitHub as a reference. It installs a headless server with some system admin tools, sets up networking, SELinux, and uses autopart to partition the disk with LVM support. Read more...

Ansible - Please add this host's fingerprint to your known_hosts file to manage this host

If you’ve ever tried to run an ansible playbook and recieved Please add this host's fingerprint to your known_hosts file to manage this host you’re not alone. Here’s a couple of ways to fix it. Turn off host key checking This would not be the preferred method but turning off host key checking will enable ansible to continue on with the playbook. Either modify the /etc/ansible/ansible.cfg or create an ansible.cfg file in the project directory and add the following lines to it: Read more...

Install and Configure Embedded Python on Windows

I wanted to document these steps after downloading embedded Python recently. I extracted it, set the environment path and started the interpreter. Everything seemed to be going smoothly until I tried to exit exit() and it reported back ’exit not found’ or something like that. What!? How can this be? I ended up import sys and using sys.exit() but this sent me on an adventure to determine how to use embedded Python as a regular install. Read more...

Convert Images to WebP using the Linux command line and Docker

The webp command line tool from Google makes it quite simple to convert images to the webp format from the command line. It can convert JPG, PNG, and TIFF images to WebP. Not sure what webp is? Read more about webp on Wikipedia. If you don’t have Docker installed on your system already, go ahead and install it now. Spin up a Debian Bookworm docker container and mount the directory with your images to the container. Read more...

Install OpenWRT x86 64 Using an A/B Partition Setup

A quick reference for OpenWRT Installation Prepare Debian bootable USB Connect your Debian USB and boot Download OpenWRT image onto the Debian USB Flash the SSD drive with the OpenWRT image Resize the OpenWRT partition Create an additional partition Upgrade Prepare a bootable Debian USB You can use another distro if you’d like. I use Debian as a personal perference and also because it’s relatively quick to create a live USB. Read more...

Connecting from Mac OSX to Ubuntu Desktop

After discovering how pleasant it can be without the sound of a whirring fan, I started looking for options to move my desktop as far away as possible so I no longer had to listen to all the fan noise. The MicroSoft RDP App works great on Mac and allows me to connect to not only Windows but to Linux desktop environments. After installing this on my mac I was able to remote into my Windows desktop (Follow this guide). Read more...

Detect When the Browser URL Changes (JavaScript)

When building a single page web app it’s important to update the URLs without refreshing the page and so the user can easily copy and share or revisit the current page. How Can This Be Done? Fortunately the browser provides an API that works in such use cases. Enter “popstate event” this works hand and hand with the history.pushState() event which updates the URL. When the user clicks either the forward or back button the URL will change but unfortunately the page content will not. Read more...