Skip to content

Instantly share code, notes, and snippets.

View catchsudheera's full-sized avatar

Sudheera Palihakkara catchsudheera

View GitHub Profile
@catchsudheera
catchsudheera / gist:68bcb4747e7e4127cd1162112791c99e
Created December 31, 2024 12:00
Upgrade ubuntu server from EOL version "Lunar" to latest
sudo sed -i 's|http://ports.ubuntu.com/ubuntu-ports|http://old-releases.ubuntu.com/ubuntu|g' /etc/apt/sources.list
sudo apt update && sudo apt upgrade -y
sudo sed -i 's|lunar|mantic|g' /etc/apt/sources.list
sudo apt update && sudo apt upgrade -y
# Had to fix the installs for libc6
sudo apt --fix-broken install
sudo apt dist-upgrade
@r0l1
r0l1 / README.md
Created February 8, 2018 21:44 — forked from Luzifer/README.md
Running docker-compose as a systemd service

Running docker-compose as a systemd service

Files

File Purpose
/etc/compose/docker-compose.yml Compose file describing what to deploy
/etc/systemd/system/docker-compose.service Service unit to start and manage docker compose
/etc/systemd/system/docker-compose-reload.service Executing unit to trigger reload on docker-compose.service
/etc/systemd/system/docker-compose-reload.timer Timer unit to plan the reloads
@Dreyer
Dreyer / nordvpn.sh
Last active April 30, 2025 13:17
Check the status of a NordVPN connection from your shell.
#!/bin/bash
URL='https://web-api.nordvpn.com/v1/ips/info'
JSON=$(curl -s $URL)
printf "\n"
#echo $JSON | python -m json.tool
echo $JSON | python -c 'import sys, json; data = json.load(sys.stdin); print("IP: %s (%s)\nStatus: %s" % (data["ip"], data["isp"], "\033[32mProtected" if data["protected"] is True else "\033[31mUnprotected"));'
printf "\n"