Skip to content

Instantly share code, notes, and snippets.

@gnoling
gnoling / get-public-ip.md
Created July 10, 2025 15:07 — forked from rkalkani/get-public-ip.md
Get public IP address used by your machine to connect to the internet

Get Public IP

DNS

Google

dig o-o.myaddr.l.google.com txt @ns1.google.com +short
# OR
nslookup -type=txt o-o.myaddr.l.google.com ns1.google.com
@gnoling
gnoling / get_agents_yaml_ha.sh
Created February 11, 2024 19:59
get_agents_yaml_ha.sh
#!/bin/bash
# Usage: ./get_agents_yaml_ha.sh cluster_name
# Needs to have KUBECONFIG environment variable set or ~/.kube/config pointing to the RKE Rancher cluster
set -x
# Check if jq exists
command -v jq >/dev/null 2>&1 || { echo "jq is not installed. Exiting." >&2; exit 1; }
command -v kubectl >/dev/null 2>&1 || { echo "kubectl is not installed. Exiting." >&2; exit 1; }
@gnoling
gnoling / rancher_versions.sh
Created July 24, 2023 16:00
Rancher versions
#!/bin/bash
for app in k3s rke2 rancher; do
curl -ks "https://update.${app}.io/v1-release/channels" | \
jq --arg app "${app}" -r '.data[]|select(.id==("stable","latest","testing"))|[$app, .name, .latest]|@tsv'
echo
done