jq is useful to slice, filter, map and transform structured json data.
brew install jq
This snippet will convert a PEM based certificate of key to JSON format. This is useful when having to embed a certificate in a JSON object.
It will simply add \n
in the required places.
The snipped was copied from here: https://docs.vmware.com/en/Unified-Access-Gateway/2.9/com.vmware.access-point-29-deploy-config/GUID-870AF51F-AB37-4D6C-B9F5-4BFEB18F11E9.html
/* This script auto-generates a Google OAuth token from a Service Account key, | |
* and stores that token in accessToken variable in Postman. | |
* | |
* Prior to invoking it, please paste the contents of the key JSON | |
* into serviceAccountKey variable in a Postman environment. | |
* | |
* Then, paste the script into the "Pre-request Script" section | |
* of a Postman request or collection. | |
* | |
* The script will cache and reuse the token until it's within |
# Install GNU parallel in a CentOS-based docker container (e.g. for CI/CD) | |
# install needed dependencies | |
yum install -q -y bzip2 tar make perl | |
# download source | |
curl -s -L -o /tmp/parallel.tar.bz2 https://ftpmirror.gnu.org/parallel/parallel-latest.tar.bz2 | |
# extract source | |
tar -C /tmp -xjf /tmp/parallel.tar.bz2 | |
# navigate into extracted source | |
cd /tmp/parallel-* | |
# build and install |