Filezilla Error loading queue_sqlite3

The other day a Windows 10 user client called reached out to me panic about this error in Filezilla “Error loading queue_sqlite3”

I put my irregular bucket hat before taking on this one. Then I remote to the user’s machine trying to figure out why this is happening. I tried to re-install Fillezilla and still got the above error. Then, I remember that Filezilla keeps this sqlite3 DB file for faster processing. So, when this happens it means the sqlite3 file is corrupted.

The only way to fix this issue is to remove or rename the sqlite3 file. I renamed it just to be safe and rebooted Windows. All worked after this. Filezilla generated a new one.

Hope this brief tutorial helps somebody. You can always contact me if you have any questions. Remember to visit my IT Handyman shop for cool coffee mugs and T-Shirts I designed.

How to get Password Age using Powershell

After brewing my favorite coffee variety at home a client emailed me asking if there’s a way to get password age for the Active Directory users in her small company. This was for about 80 users. To be honest, I have not touched AD in a while. But, I found some clues for getting password Age using Powershell in Windows Server.

I found some magic in getting password Age using Powershell. A very simple command to get all users with their passwordlastset and passwordneverexpires:

Get-ADUser -Filter * -Properties passwordlastset, passwordneverexpires | ft name, passwordlastset, passwordneverexpires

You can also send the results to a CSV file:

Get-ADUser -Filter * -Properties passwordlastset, passwordneverexpires | select name, passwordlastset, passwordneverexpires |Export-CSV -Path c:\users.csv -Encoding utf8

You can also exclude users that password never expires:

Get-ADUser -Filter * -Properties passwordlastset, passwordneverexpires | where {$_.passwordNeverExpires -eq $false } | select name, passwordlastset, passwordneverexpires

But, to really fined tune the Powershell command you can use the below. It will give you a list of all users and the exact password expiration date:

Get-ADUser -filter {Enabled -eq $True -and PasswordNeverExpires -eq $False} -Properties "DisplayName", "msDS-UserPasswordExpiryTimeComputed" | Select-Object -Property "Displayname",@{Name="ExpiryDate";Expression={[datetime]::FromFileTime($_."msDS-UserPasswordExpiryTimeComputed")}}

I hope this brief tutorial can help someone out there. If you have other ideas please share them in the comments section below. Thank you for your support!

Add your Script to your Local Path macOS

The other day I created a script using Imagemagick for efficiently get my image ready for the web. After making a fantastic espresso coffee at home I decided to add my script to my local path. This helps because it will make your script ‘global’. This means you can invoke it from any location while in your Terminal – it will run as any other command such as ping, ssh, rsync and etc..

Adding your Script to your Local Path in macOS is easier than I expected. Just copy your script to this path in your macOS:

/usr/local/bin/

I know you can also do a link to it, but I decided to copy it for now and test.

Now, I can call my script from any directory in my Terminal. For example, when I have a folder full of images waiting to be optimized for the web, I just do:

myimagescript /images_for_the_web

or:

cd /images_for_the_web and then type myimagescript

Hope this brief add your Script to your Local Path macOS tutorial helps. You can always contact me if you have any questions. Also, check out my coffee mugs and T-Shirt designs below. I made them myself. Thanks!

Create a Child Theme in WordPress

Hello! Creating a child theme in WordPress allows you to make changes to an existing theme without modifying its core files. Here’s a step-by-step guide on how to create a child theme:

Create a new folder on your computer or in your host server. Give it a name that represents your child theme (e.g., my-child-theme).

Inside the newly created folder, create a new file called style.css. Open it in a text editor.

In the style.css file, add the following code to define the information about your child theme:

/*
Theme Name: My Beautiful Child Theme
Template: twentytwentytwo
*/

Replace My Beautiful Child Theme with the desired name for your child theme, and twentytwentytwo with the name of the parent theme you want to create a child theme for.

Save your style.css

If you want to override specific template files from the parent theme, create a new folder within your child theme folder called template-parts. You can replicate the directory structure and file names of the templates you want to override. For example, if you want to override the content.php file, create the following structure: my-child-theme/template-parts/content.php.

Next, upload the entire child theme folder (including the style.css file and the template-parts folder if applicable) to the wp-content/themes/ directory on your WordPress site.

Log in to your WordPress admin area and go to Appearance > Themes. You should see your new child theme in the list. Now, select “Activate” button to activate your child theme.

Always refer to the official WordPress documentation for best practices.

Contact me with any questions. Also, check out my IT Handyman shop. I make my own coffee mugs and T-Shirt designs. Thanks!

Remove Powered by WordPress footer from Twenty Twenty-One Theme

To remove this “Powered by WordPress” from the footer is quite easy. For best practice I suggest you create a child theme first. If you don’t you will loose the changes whenever you update your theme. A client called me to make this simple change for his new website about Latin America Coffee.

I put together these simple steps. Let me know what you think. You can always contact me if you have any questions.

To remove the footer from the Twenty Twenty-One theme in WordPress, you can modify the theme files. Here’s how you can do it:

  1. Access your WordPress installation files via FTP, SSH or use a file manager provided by your hosting provider.
  2. Navigate to the directory wp-content/themes/twentytwentyone/.
  3. Locate the footer.php file within the Twenty Twenty-One theme folder.
  4. Open the footer.php file in a text editor.
  5. Find the section of code that represents the footer content. It typically starts with <div class="powered by"> or something similar.
  6. Delete or comment out the code for the footer content that you want to remove. You can remove the entire section of code related to the footer or make any changes you like.
  7. Save the changes to the footer.php file.

After following these steps, the footer content should be removed from your Twenty Twenty-One theme.

Remember, always have a backup of your files just in case. I will keep coding with coffee until I die. Thanks!

ImageMagick Auto Orient

I was having issues converting images for one of my clients the other day. I have been using ImageMagick for some time and it has worked great for me. But, for some reason a couple of images were rotating to a horizontal view when the original photo I took was vertical.

After looking at some cool hat designs I got some inspiration and found a way to keep the orientation of my original photos. It was quite simple this time. You need to add -auto-orient option to the convert command, for example:

convert thisimage.jpg -auto-orient goodimage.jpg

I found that jpg images have a header flag which specifies how the image was taken by your camera in the EXIF data. Give it a try and contact me if you have any questions.

Some of my coffee mugs and T-Shirt designs

Format External HD for macOS and Windows

If you want to use an external hard drive that can be used on both Mac and Windows computers, it’s recommended to use the exFAT file system.

exFAT is a file system that is supported by both Mac and Windows operating systems, as well as by other systems like Linux. This means that you can use the same external hard drive on a Mac and a Windows computer without any issues.

One of the advantages of exFAT is that it allows for large file sizes and partition sizes, which is useful if you want to store or transfer large files like video or music files. exFAT also supports file and folder names in various character sets, which is important if you want to use special characters in your file names.

It’s worth noting that if you plan to use the external hard drive primarily with a Mac, you can also use the Mac OS Extended (Journaled) file system, also known as HFS+, which is the default file system used by Mac computers. However, this file system is not natively supported by Windows, so you would need to install third-party software to read and write to the drive on a Windows computer. Using exFAT would eliminate the need for third-party software on Windows.

In summary, if you want to use an external hard drive on both Mac and Windows computers, it’s recommended to use the exFAT file system, as it is supported by both operating systems and allows for large file sizes and folder names in various character sets.

Remove default Storefront footer

A customer called me saying he was creating an online store for selling cool hats online. The customer was using the default Storefront theme in WordPress.

I have some experience setting up online stores. After setting up some products, permalinks and etc. We saw the theme was still displaying the default credit footer “Built with Storefront & WooCommerce”. We wanted to remove it. There are many ways to do this including plugins. I tend to stay away from installing too many plugins in WordPress – specially when the solution is simple.

I found the two simplest ways to remove the default storefront footer credits:

  1. Using CSS. Navigate to your WordPress Dashboard > Appearance > Customize and go to Additional CSS tab add the following CSS code:
.site-info a {
display: none;
}
  1. Using PHP code. Enter the below in your function.php file in your theme:
remove_action(‘storefront_footer’, ‘storefront_credit’,20);

Hope this is helpful. Contact me if you have any questions. Thanks!

ImageMagick to convert jpg to webp

I have been working with a lot a photos I take during my walks in NYC and when I travel to visit coffee farms in Latin America. I needed an efficient way to process my images for the web. I put these brief instructions together. You can also make this a script and process images in bulk.

To convert a JPG image to WebP format using ImageMagick, you can follow these steps:

Install ImageMagick: Make sure you have ImageMagick installed on your computer. You can download it from the official website (https://imagemagick.org/) and follow the installation instructions specific to your operating system. If you’re on a mac you can always use brew to install this.

Use the following command to convert the JPG image to WebP:

magick inputFile.jpg outputFile.webp

Adjust compression quality (optional): By default, ImageMagick will use a compression quality of 75. If you want to adjust the compression quality, you can add the -quality option followed by a value from 1 to 100. For example, to set the quality to 90, modify the command as follows:

magick inputFile.jpg -quality 90 outputFile.webp

Remember to replace “magick” with “convert” if you are using an older version of ImageMagick.

You can always contact me if you have any questions. Make sure to check out my cool Coffee mugs and T-Shirt shop. I make all the designs.

Linux dig Command

The Linux dig command is useful for DNS lookup and to query specific DNS name servers.

Basic syntax is:

dig hostname

This will give you a generic answer similar to this:

; <<>> DiG 9.10.6 <<>> oopsla.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31918
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;oopsla.com.			IN	A
;; ANSWER SECTION:
oopsla.com.		8	IN	A	54.147.36.143
oopsla.com.		8	IN	A	54.173.18.128
;; Query time: 45 msec
;; SERVER: 172.16.10.108#53(172.16.10.108)
;; WHEN: Wed Mar 22 10:54:37 EDT 2023
;; MSG SIZE  rcvd: 71

To ask a specific DNS name server use the below Linux dig command:

dig @dns-name-server <hostnameToQuery>

Select DNS query type with the dig command. The syntax is below:

dig hostname type

For example, you want to query mail records(MX records)

dig myhostname MX

Query for A records:

dig cocotu.com A

If you like to find the hostname of an IP address:

dig <sampleIP>
dig 32.124.233.153

Hope you like this brief tutorial. If you like to support me check out my code with coffee T-Shirt I designed myself. Also, contact me if you have any questions.Thanks.