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 was getting an Apache error on startup and during a restart after upgrading to Linux Mint 22. As it turned out, the module that’s enabled is php8.1. It should be 8.3. Here’s the fix: sudo a2dismod php8.1 sudo systemctl restart apache2 This did the trick, but I was getting another error during restarting services. The error says “could not reliably determin the server fully qualified domain.” Here’s the fix for that. ...
How to undo git’s last commit. git reset --soft HEAD~ Undo the last 2 commits. git reset --soft HEAD~2 Undo local changes. git reset --hard abcd543
I’m trying to figure out why my audio is not automatically starting on Linux. After some trial and error, here’s the fix. Edit the /etc/pulse/client.conf file. vi /etc/pulse/client.conf Change “autospawn=no” to “autospawn=yes.” autospawn=yes Make sure to take out ‘;’ or ‘#" to remove the comment. pulseaudio --start Once you modified the file, restart pulseaudio. pulseaudio --start Reboot your machine to check if audio is working on boot. If that doesn’t work, delete the cookie. ...
Somehow I lost my audio devices in Linux Mint. Instead, the only audio device present in the system is the ‘dummy output.’ Googling for answers was not clear cut. After many trials and errors I was able to get my sound fixed. Here are the commands I took to get my audio devices back in the fold in Linux Mint. Your mileage may vary. First, validate your sound devices are still present or being recognized on your system. ...
How to exit gracefully from GCP’s serial console. Type on the keyboard tilde followed by dot. ~. That would be tilde followed by a dot.
Here’s a good way to add comments to a Bash function. ############################################################ # Function : calculate_average # Description : Calculates the average of a list of numbers. # Parameters : List of numbers separated by spaces # Returns : The average value of the input numbers ############################################################ calculate_average() { ... } ############################################################ # Function : calculate_sum # Description : Calculates the sum of a list of numbers. # Parameters : List of numbers separated by spaces # Returns : The sum value of the input numbers ############################################################ calculate_sum() { ... }
How to add to a crontab without creating duplicates. crontab -l | grep 'myscript.sh' || (crontab -l 2>/dev/null; echo "45 10 * * * /path/to/myscript.sh") | crontab -
Here’s a good way to compare two directories to see if both directories contain similar files. This is essential if you want to combine two directories into one. diff -qr dir1 dir2 | sort
Here’s a function that will convert a timestamp from one timezone to another, in this case from UTC to ET timezone. Get a list of snapshots list_snapshots() { volume_name="$1" snapshots=$(gcloud compute snapshots list --filter="sourceDisk=$volume_name" --format="value(name,creationTimestamp.date('%s'))") while read -r snapshot; do snapshot_name=$(echo "$snapshot" | cut -d' ' -f1) creation_timestamp=$(echo "$snapshot" | cut -d' ' -f2) et_creation_timestamp=$(convert_to_et "$creation_timestamp") echo "Snapshot: $snapshot_name, Creation Time (ET): $et_creation_timestamp" done <<< "$snapshots" } The function to convert to ET timezone. ...
After a few weeks with OpenWRT, I decided to switch over to DDWRT. There is nothing wrong with OpenWRT. DDWRT is a much simpler interface. It seems to be very stable as well. I don’t recall any reboots other than service provider having an internet issue. I think that was a great decision while still using old router hardware, a Linksys E4200 circa 2011 (release date). One of these days I will have to purchase a new router, but why fix something that not broken.