12 August 2022

Making Ubuntu recognize and use the swap partition instead of using the swap file it created

This happened when I deleted my old Ubuntu partition and re-installed a newer version of Ubuntu. Even though there was a logical swap partition present, Ubuntu simply ignored it and created its own swap file. A glance through the Swap FAQ showed me how to fix it.

First, you need to have a look at what the UUID of your swap partition is. Do that by running:

blkid

Search for the line containing TYPE="swap", and note the UUID at the start of the line. This is the UUID of the swap partition. For example, the UUID may be fdb91fbe-e580-467f-8819-b672d89261eb.

Now open up fstab.

sudo gedit /etc/fstab

If there's a line starting with "/swapfile", comment out that line using a hash at the start of the line "#/swapfile". This is the swapfile that Ubuntu used instead of using the swap partition you had created.

Now add a new line to the file, where you mention the UUID that Ubuntu can use to recognize the swap partition:

UUID=fdb91fbe-e580-467f-8819-b672d89261eb none   swap    sw      0       0

Save and exit. Reboot.

Voila! The swap partition will now be recognized.


11 August 2022

Another of Google's Easter Eggs: Dog and cat paws. Even Batman zooming across the screen!

It's a relief from the daily grind to see one of Google's Easter Eggs in the form of some animations, games or silly suggestions. This time, it was to celebrate international cat day. When you Google "cat" on your desktop web browser, or with your mobile phone browser switched to "desktop mode", you'll see a paw icon animating on the right side. Click it and then click anywhere else on the screen, and a cat will leave a paw mark. You can see the same when you search for "dog" or "bruce wayne".



I decided to have a look at how they did it, and there was a difference in the code of the page when there is an animation and when there isn't. Just a bunch of JavaScript.

It's nice that Google allows its employees to show some creativity from time to time. Something that other companies could learn from.