Skip to content

Instantly share code, notes, and snippets.

View Justinzobel's full-sized avatar

Justin Zobel Justinzobel

View GitHub Profile
@Justinzobel
Justinzobel / gist:aa0d056c000de38515c7f44e80ac73f8
Created September 2, 2024 02:38
How to install flatpak-builder as a Flatpak
flatpak install org.flatpak.Builder
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 / 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)
@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`

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 / 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
@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