Sunday, July 2, 2017

I/O error, dev fd0, sector 0

This happens in my Ubuntu VM and the log usually have these 2 messages

[  148.462686] blk_update_request: I/O error, dev fd0, sector 0
[  148.462735] floppy: error -5 while reading block 0

To get rid of those messages:

echo "blacklist floppy" | sudo tee /etc/modprobe.d/blacklist-floppy.conf

sudo rmmod floppy

sudo update-initramfs -u

After reboot, you can verify that floppy module (lsmod | grep floppy) no longer get loaded automatically and there is no such messages in the log anymore.

Monday, June 12, 2017

Ubuntu download deb packages without installing

To download without installaing, just use the following command

apt-get -d install package

Once done, you can go /var/cache/apt/archives to retrieve the packages you had downloaded.

Wednesday, May 24, 2017

How to print Gmail email without header information

First click on the printer button


Click cancel when prompted

Go to Developer Tools


Once you in Deveoper tools mode, you will notice there is a new pane below that show all the HTML code. Expand bodycontainer div class, when you mouse over the first table element, you will notice the section on top will be highlighted as well. This means that particular HTML code is the one that generated the highlighted section. Delete this table element.


And you will notice that Gmail header is no longer there.


Repeat these steps with other element such as

hr - to remove the seperator
first table element under maincontent div class - to remove message header
first and second tr element under message table - to remove sender and receipeint email.

After deleting the unwanted header information, you will get a clean message content. And you can proceed to print it.