Skip to content

Instantly share code, notes, and snippets.

View mmmarceleza's full-sized avatar
💭
Learning is the goal!

Marcelo Marques Melo mmmarceleza

💭
Learning is the goal!
View GitHub Profile
@caruccio
caruccio / latest-version.md
Last active March 18, 2024 16:22
Print all latest patch-level version

How to get the latest patch-level version from a list of distinct versions using bash and awk. This idea was taken from https://stackoverflow.com/a/21103864/1006369

Supose you have the following list of versions:

v1.22.8
v1.22.9
v1.22.10   <-- latest v1.22 series
v1.23.1
@superseb
superseb / rke2-commands.md
Last active October 24, 2025 08:14
RKE2 commands

RKE2 commands

  • Updated on May 29 to accommodate etcd container not having /bin/sh available anymore.

Install

curl -sL https://get.rke2.io | sh
systemctl daemon-reload
systemctl start rke2-server
@caruccio
caruccio / bash-path-vars
Last active June 6, 2025 17:01
Path manipulation with bash vars
$ FILE=/some/path/to/file.txt
###################################
### Remove matching suffix pattern
###################################
$ echo ${FILE%.*} # remove ext
/some/path/to/file
$ FILE=/some/path/to/file.txt.jpg.gpg # note various file exts