Skip to content

Instantly share code, notes, and snippets.

View matzegebbe's full-sized avatar
😯

Mathias Gebbe matzegebbe

😯
View GitHub Profile
@JoeyBurzynski
JoeyBurzynski / Homebrew_How-to-Backup-and-Restore-Homebrew-Packages-2022.md
Last active May 2, 2024 21:24
Homebrew: How to Backup & Restore Homebrew Packages [2022, MacOS]

Homebrew: How to Backup & Restore Homebrew Packages

Homebrew makes it easy to install and keep installed software up to date on your Mac - as part of my backup routine for my Mac I want to be able to run a single command to reinstall all packages.

If you're searching on how to backup & restore Homebrew, then I assume you're here for the commands.

Brewfiles

Brewfiles are files generated with definitions that Homebrew reads and processes, a generated

@matzegebbe
matzegebbe / clean_docker_nexus.sh
Last active May 3, 2024 20:07
Nexus Repository Manager keep the last X docker images delete all other
#!/bin/bash
REPO_URL="https://repository.xxx.net/repository/"
USER="admin"
PASSWORD="datpassword"
BUCKET="portal-docker"
KEEP_IMAGES=10
IMAGES=$(curl --silent -X GET -H 'Accept: application/vnd.docker.distribution.manifest.v2+json' -u ${USER}:${PASSWORD} "${REPO_URL}${BUCKET}/v2/_catalog" | jq .repositories | jq -r '.[]' )