Skip to content

Instantly share code, notes, and snippets.

View aleksbelic's full-sized avatar
🍺
Cheerz...

Aleksandar Belic Aleksanchez aleksbelic

🍺
Cheerz...
View GitHub Profile
@aleksbelic
aleksbelic / longest_words.py
Created October 14, 2020 23:16
Function prints the longest word/words in a given list.
def longest_words(words):
max_len = max(len(word) for word in words)
for word in words:
if len(word) == max_len:
print(word)
longest_words(["once", "upon", "a", "time"])
@aleksbelic
aleksbelic / GPG commands
Last active September 1, 2018 17:40
GPG commands overview
To list all public keys stored in your keyring:
gpg --list-keys
To list all private keys stored in your keyring:
gpg --list-secret-keys
To generate a new key(pair):
gpg --gen-key
To generate a revocation certificate:
@aleksbelic
aleksbelic / yum2csv.sh
Last active August 11, 2023 14:31
Yum list installed to CSV
yum list installed | awk '{print $1";"$2";"$3}' > /home/list_installed.csv
yum list available | awk '{print $1";"$2";"$3}' > /home/list_available.csv
yum check-update | awk '{print $1";"$2";"$3}' > /home/check_update.csv