4 ms·
I switched from ABP to this hosts file a few months ago and I have zero regret. My browser's faster, lighter and ads are blocked just as well as with ABP. I ac
by bru 12y ago
I switched from ABP to this hosts file a few months ago and I have zero regret. My browser's faster, lighter and ads are blocked just as well as with ABP.
I actually even started splitting my hosts file: the layout is
/etc/hosts ('compiled' version)
/etc/hosts.d/
/etc/hosts.d/aaa-warning (warning reminding me to run `update-hosts` instead of modifying /etc/hosts. Appears atop the compiled file)
/etc/hosts.d/adblock (that website's hosts file)
/etc/hosts.d/base (original system hosts file)
/etc/hosts.d/dolead (work-related file for development)
And I have the following functions in my .bashrc file:
function update-hosts() {
cat /etc/hosts.d/* > /etc/hosts;
}
function update-adblock() {
curl http://someonewhocares.org/hosts/zero/hosts -o /etc/hosts.d/adblock 2> /dev/null
update-hosts
}
So if I want to update "adblock" (it is obviously an improper name) I simply do `sudo update-adblock` and if I change another file (mostly `/etc/hosts.d/dolead`) I'll just run `sudo update-hosts`.
Works wonders.
- TarpitCarnivore 12y agoHave you been able to block stuff like Tynt, and other copy/paste triggered JS stuff?
- bru 12y agoI was not aware of Tynt, but I believe it's well blocked. I just looked at the adblock-hosts file, and 'tynt' appears several times. One of those lines is commented with a link to an article about tynt[0]. I tried copy-pasting from The New Yorker and TechCrunch (who, as claimed by the author of the article, use tynt), and both times there was no crap appended. 0: http://daringfireball.net/2010/05/tynt_copy_paste_jerks http://daringfireball.net/2010/05/tynt_copy_paste_jerks
- TarpitCarnivore 12y agoThanks, I may try this out and see if I can move over my few custom blocked sites that implement this stuff.
- eli 12y agohttp://www.tynt.com/opt_out http://www.tynt.com/opt_out
- barrkel 12y agoMost of my adblock stuff is CSS based. I use element hiding helper to figure out which bits to kill. I have hundreds of these custom rules.
- userbinator 12y agoIf you want to pull hosts files from multiple sources, you may want to consider sort'ing and uniq'ing to remove duplicates.
- migbac 12y agoI made a simple script that merges, and removes duplicates from different sources: https://gist.github.com/louima/878171fc67d797cfcef4 https://gist.github.com/louima/878171fc67d797cfcef4
- pid1 12y agoInteresting and thanks for sharing. I've been using https://gaenserich.github.io/hostsblock/ https://gaenserich.github.io/hostsblock/