Skip to content

Instantly share code, notes, and snippets.

View nilayk's full-sized avatar

Nilay Khandelwal nilayk

  • AdSupply Inc.
  • Los Angeles, CA
View GitHub Profile
@nilayk
nilayk / easylist.pl
Created May 14, 2018 20:50 — forked from g3rhard/easylist.pl
Adding EasyList subscriptions for PiHole project
#!/usr/bin/perl -w
#Source: https://newspaint.wordpress.com/2014/08/18/filtering-easylist-for-hosts-file-style-adblock/
use strict;
my %hosts = ();
while ( <> ) {
if ( $_ =~ m/^\|\|([a-z][a-z0-9-_.]+\.([a-z]{2,3}))\^\s*$/ ) {
$hosts{$1} = 1;
}