How to see HTTP headers and raw output during debugging with cURL

When debugging, it is often helpful to see the returned HTTP headers and the raw output of a curl request. This can be done using the following command:

curl -X GET -is -o /dev/stdout https://myhost

If you need information about the connection establishment and TLS handshake, you can add the -v flag to the command:

curl -X GET -isv -o /dev/stdout https://myhost

Call Gradle Wrapper from nested Directory

The following script will allow you to use gw instead of ./gradlew in any subdirectory. gw will go up the directory hierarchy until it finds gradlew or a gradle settings file.

[Read More]

klogg is the new glogg

I used glogg for years but noticed that the last release was in 2017 and noticed that there is a fork called klogg which has many improvements: klogg

How to create a random String with Bash

With this approach you can create nearly every random text or number.

tr -dc '0-9A-Za-z' < /dev/random | head -c10

Explanation:

tr -dc deletes all characters except those specified in the argument. This means that we waste a lot of bytes, but for occasional manual use, this is usually acceptable.
| head -c10 prints the first 10 characters of the output of the previous command.