Welcome
My name is Ulysses. Sr. Cloud Engineer at Cardinal Health.
About This Website
This is my static site based on Hugo.
My name is Ulysses. Sr. Cloud Engineer at Cardinal Health.
This is my static site based on Hugo.
I bought a DJI Osmo Pocket 3 back in mid September. I brought it with me to Italy for my trip. I got some great footage of Sorrento, Capri, Positano and Amalfi, Rome and among other places. I came home and couple of weeks later, the screen would not stay in horizontal mode. Some sort of mechanical issue. I sent it to DJI for repair in their Dallas facility. Two weeks later they sent it back. I think they just gave me a replacement because the box was still unopened. They sent back the original box. I now have two protective covers, 2 wrist straps, two short handles and 2 USB type C cables. Nevertheless, I’m back to taking videos. Today, I cut our banana tree in preparation for the winter. I took a 10 second time lapse footage that might be worth seeing.
I’m trying Hugo, a static website generator, along with Pages CMS, a web editor.
An Ansible script that makes multiple machines reservations in a GCP project based on machine type, zone and number of running instances. The script … Creates new reservations if it’s non-existent with count. Update an existing reservation by increasing or decreasing count. Delete a reservation if no instances are present or none are running. Print a summary at end of the script.
If you have a text file with multiple columns, you can use column to align the output vertically. cat output.txt | column -t
Here’s the script that will the dos2unix command recursively in the current directory. It doesn’t have to be dos2unix but can be any command. Run it on all files. find . -type f -exec dos2unix {} + Run it on all shell files only. find . -type f -name "*.sh" -exec dos2unix {} +
Here’s my $0.13 cent cloud bill. Back in the day, my cloud bill was anywhere between $10-20 per month because I was hosting a VM. I converted from WordPress site to Jekyll, a static site generator hosted for free at GitHub. My photo gallery is hosted in AWS S3. I use node.js programs to generate the galleries. My total bill this month is $0.13. It will climb a few cents as I upload more photos.
This is the command to display system memory in GB in Linux. grep -E 'MemTotal|MemAvailable' /proc/meminfo | awk '{printf "%s %.2f GB\n", $1, $2/1024^2}'
Here’s a nice little script that generates a random string. User is asked to match the string. If there’s a match, it continues. If there’s no match, it will exit. confirm() { CHARNUM=6 CHARSET='A-Za-z0-9' # Generate random string RANDOM_STRING=$(LC_ALL=C tr -dc $CHARSET </dev/urandom | head -c $CHARNUM) printf "%s\n" "Please confirm Code to continue: $RANDOM_STRING" read -r -p "Code: " USER_INPUT if [[ "$USER_INPUT" != "$RANDOM_STRING" ]]; then echo "❌ Code does not match! Exiting!" exit 1 fi echo "✅ Code matched!" echo "Shutting down server!" }
Here’s my new git push script. #!/bin/bash comment=$1 if [[ -z $comment ]]; then echo "Usage: $0 'put your comment here'" exit fi git add . git commit -am "$comment" git push To use the script, simply execute ./gitPush.sh ‘put your git comment here’ The script will add, commit and push it to your remote repository.
I run Gitea on my desktop. Recently my desktop IP address changed. I should really set it to a static IP address, but that’s another story. Doing a git pull and a git push no longer works since the remote URL changed. To update to a new remote location, simply run the command below. git remote set-url origin http://192.168.68.105:3000/ulysses/scripts.git If you use SSH, use the SSH remote link instead of HTTP.