From 655d8eccb3aa9bf262f4153da1d14fb05a5127ce Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Thu, 28 Dec 2023 22:42:05 +0100 Subject: [PATCH] chore: added checksum checking tool shasum --- knowledge base/homebrew.md | 30 +++++++++++++++++++++++++----- knowledge base/shasum.placeholder | 18 ++++++++++++++++++ 2 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 knowledge base/shasum.placeholder diff --git a/knowledge base/homebrew.md b/knowledge base/homebrew.md index 6230fce..2ce872c 100644 --- a/knowledge base/homebrew.md +++ b/knowledge base/homebrew.md @@ -1,11 +1,20 @@ # Homebrew +1. [TL;DR](#tldr) +1. [Configuration](#configuration) +1. [Downgrade an application to a non-managed version](#downgrade-an-application-to-a-non-managed-version) + 1. [The easy way](#the-easy-way) + 1. [The hard way](#the-hard-way) +1. [Gotchas](#gotchas) +1. [Further readings](#further-readings) +1. [Sources](#sources) + ## TL;DR ```sh -# Install/uninstall on OS X. +# Install on OS X. /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" -/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)" + # Search for formulae. brew search 'parallel' @@ -15,9 +24,6 @@ brew search --cask 'gpg' brew install 'gettext' brew install --cask 'spotify' -# Uninstall something. -brew uninstall --zap 'keybase' - # Get formulae's dependencies. brew deps brew deps --installed 'azure-cli' @@ -26,17 +32,27 @@ brew deps --tree # Get information on formulae. brew info 'sponge' +# List all files installed by formulae. +brew ls -v 'coreutils' +brew ls -v --cask 'firefox' + # Prevent formulae from upgrading. brew pin 'gnupg2' +# Uninstall something. +brew uninstall --zap 'keybase' + + # Add taps. # Only one at a time. brew tap 'homebrew/services' + # Manage services. # Requires the 'homebrew/services' tap. brew services start 'openssl-osx-ca' + # Bring an installation up to speed from a Brewfile. brew bundle brew bundle --global @@ -45,6 +61,10 @@ brew bundle --file "$HOME/Brewfile" --no-lock # Dump all installed casks/formulae/images/taps into a Brewfile in the current # directory. brew bundle dump + + +# Uninstall from OS X. +/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)" ``` ## Configuration diff --git a/knowledge base/shasum.placeholder b/knowledge base/shasum.placeholder new file mode 100644 index 0000000..4b5428c --- /dev/null +++ b/knowledge base/shasum.placeholder @@ -0,0 +1,18 @@ +# Shasum + +1. [TL;DR](#tldr) + +## TL;DR + +```sh +# Install the tools. +brew install 'coreutils' + +# Print the checksum of given files. +sha512sum 'path/to/file' +sha1sum 'path/to/file.1' 'path/to/file.N' + +# Check files given their checksum and name in one or more files. +sha256sum -c 'expected.sha256' +sha512sum -cw 'expected.1.sha512' 'expected.N.sha512' +```