2012. február 24., péntek

Adblock plus element hiding

Sometimes you will find advertisements that can't be blocked because they are embedded as text in the web page itself. If you look at the source code of the web page you might find something like this:

Cheapest tofu, only here and now!
Really cheap tofu, click here!

Only here you get the best tofu!

You need to download the web page so you will necessarily download the advertisements. All you can do here is to hide the advertisement so you don't need to see it. That's what element hiding is meant for.

The first advertisement above is contained inside a div element with class attribute "textad". The following rule will hide exactly this combination: ##div.textad. Here ## marks an element hiding rule while the rest is a selector identifying the elements that need to be hidden. You can hide elements by their id attribute similarly, ##div#sponsorad will hide the second advertisement. You don't need to specify the element name, the rule ##*#sponsorad will work just as well. And you can hide elements by element name only, e.g. ##textad for the third advertisement.

The Element Hiding Helper extension helps selecting the correct element and writing the corresponding rule without having to view the source code of the page. Basic HTML knowledge is useful nevertheless.

Note: Element hiding works very differently from normal filters. This has the implication that no wildcards are supported in element hiding rules.

More info:
http://adblockplus.org/en/filters
plugin:
http://adblockplus.org/en/elemhidehelper

2012. február 3., péntek

How to Mount Clonezilla Images


While searching for how to mount clonezilla images I came across a post here that said it couldn't be done. Unfortunately it's in the archive so I can't post a reply to it to correct it. One definitely can mount clonezilla images to extract files from them and here's how to do it (as per the clonezilla FAQ athttp://drbl.sourceforge.net/faq/inde..._ntfsclone.faq):


1. Prepare a large disk in Linux
2. Say if your image is /home/partimag/YOURIMAGE/, and the image is /home/partimag/YOURIMAGE/hda1.ntfs-img.aa, hda1.ntfs-img.ab...
run
"file /home/partimag/YOURIMAGE/hda1.ntfs-img.aa"
to see it's gzip, bzip or lzop image. Say it's gzip, then you can run
cat /home/partimag/YOURIMAGE/hda1.ntfs-img.* | gzip -d -c | ntfsclone --restore-image -o hda1.img -
Then you will have a "hda1.img" which you can mount it by
mount -o loop -t ntfs hda1.img /mnt


Then all the files are in /mnt/


Enjoy!