Skip to content

Instantly share code, notes, and snippets.

View Justinzobel's full-sized avatar

Justin Zobel Justinzobel

View GitHub Profile
@Justinzobel
Justinzobel / ssl-certs.sh
Created August 1, 2025 02:06
Get SSL expiry days for domains in Uptime Kuma into CSV
#!/usr/bin/sh
# This script generates a list of urls domains monitored and checks their SSL expiry date
cd /home/uptime-kuma/uptime-kuma/data
if [ -f /tmp/ssl-check-data ];then rm /tmp/ssl-check-data;fi
sqlite3 kuma.db 'select id from monitor_tls_info' > /tmp/ssl-check-data-IDs
while read id
@Justinzobel
Justinzobel / lu.sh
Last active July 22, 2025 02:57
Alpine - list upgradeable packages in a nice coloured table
#!/bin/sh
echo 'Updating repository data ...'
apk update
# List upgradeable packages into a temporary file
apk list --upgradeable | sed -e 's/{//g' -e 's/}//g' -e 's/]//g' > /tmp/apk-upgradeable
# Add column headers
echo 'Package,Installed Version,New Version' > /tmp/apk-upgradeable-final

If you want to prevent certain packages being accidentaly or purposely being removed, do this.

Example packages: nano and vim

Create a file: /etc/apt/apt.conf.d/protectedPackages

Place this into the file:

pkgCacheGen::ForceEssential {
 "nano";
@Justinzobel
Justinzobel / gist:a0632813310b34f1b284e0cee09d4616
Created March 3, 2025 11:13
Librewolf keep tabs between sessions
LibreWolf by default closes all tabs unless they are pinned when you exit.
`Settings > General > Open previous windows and tabs`
@Justinzobel
Justinzobel / add-ppa-manual.md
Last active May 26, 2025 23:05
How to add a PPA on Ubuntu without add-apt-repository or the software-properties-common package

I wrote this down as I don't like having to install a handful of dependencies just to add a repository (PPA) on Ubuntu.

I used fish in my example.

Get the signing key URL

  1. Open PPA Page (https://launchpad.net/~fish-shell/+archive/ubuntu/release-3 for example)
  2. Click Tecnical details about this PPA (green writing)
  3. Click the signing key link (this goes to https://keyserver.ubuntu.com/pks/lookup?fingerprint=on&op=index&search=0x88421E703EDC7AF54967DED473C9FCC9E2BB48DA)
  4. Right click the link after sig cert and copy link (This copied link goes in the curl command to get the key)
Commands to run
# This will take a while:
`gitlab-rails console`
Then once you have the prompt `Feature.enable(:vscode_web_ide), run:
`Feature.enable(:vscode_web_ide)`
@Justinzobel
Justinzobel / gist:aa0d056c000de38515c7f44e80ac73f8
Created September 2, 2024 02:38
How to install flatpak-builder as a Flatpak
flatpak install org.flatpak.Builder
@Justinzobel
Justinzobel / gist:aaf6fd4021a4ac9106219ae18c845de7
Created May 21, 2024 02:21
How to get Steam OS to use Wayland on the Desktop Mode
echo wayland > ~/.config/steamos-session-type
Then reboot.
@Justinzobel
Justinzobel / gist:8e0ac0264c1872f7636d06b5362ff06e
Created April 30, 2024 03:11
Combat Master Steam Launch Options
-screen-width 2560 -screen-height 1440 -screen-fullscreen 1
@Justinzobel
Justinzobel / git_squash_commits_locally.md
Created October 25, 2023 07:41
Git Squash Commits Locally

4 is the number of commits you want to squash

git rebase -i origin/master~4 branch_name

This will open your edit, replace the pick with squash on the commits you want to squash into the main commit.

The editor will open again and you need to comment out all commit messages that you don't want.

git push -f git push origin +branch_name