Tech and Stuff

Tech and Stuff is a blog site about Development and DevOps stuff

Check_certificate_info

It comes handy to check certificate dates and some useful info. I’ve created a script that prints out those info in a simple way: #!/bin/bash readonly SERVERNAME="$1" readonly DEFAULT_PORT="443" USER_DEFINED_PORT="${2}" readonly PORT="${USER_DEFINED_PORT:=$DEFAULT_PORT}" if [ -z "$SERVERNAME" ] then echo "You have to specify a servername" exit 1 fi echo "Checking \"$SERVERNAME\" on port \"$PORT\"" echo "========== DATES ==========" echo | openssl s_client -servername "$SERVERNAME" -connect "$SERVERNAME":"$PORT" 2>/dev/null | openssl x509 -noout -dates echo "========== ISSUER / ISSUED TO ==========" echo | openssl s_client -servername "$SERVERNAME" -connect "$SERVERNAME":"$PORT" 2>/dev/null | openssl x509 -noout -issuer -subject echo "========== FINGERPRINT ==========" echo | openssl s_client -servername "$SERVERNAME" -connect "$SERVERNAME":"$PORT" 2>/dev/null | openssl x509 -noout -fingerprint

December 23, 2021 · sonickenbaker

Google Drive Foldersize

Getting the size of a Google Drive folder is not a trivial task. Google does not provide a method from the GDrive UI to get that info. Even by using the Classes provided by Google Apps Script you don’t have that info exposed. So I made this function that calculate the size of a folder: Function gets a Folder Class item as input and recursively traverse it to calculate the sum of all the files contained in it....

October 15, 2021 · sonickenbaker

Node Dependencies

There are several dependencies that Node.js relies on to work the way it does. To get more information on Node.js dependencies, you can take a look here. Find library dependencies used by an installed Nodejs interpreter One way to check those dependencies is to issue this command: node -e "console.log(process.versions)" Example output for node v12.18.4: { node: '12.18.4', v8: '7.8.279.23-node.39', uv: '1.38.0', zlib: '1.2.11', brotli: '1.0.7', ares: '1.16.0', modules: '72', nghttp2: '1....

October 14, 2021 · sonickenbaker