npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

hblock

v3.4.4

Published

Adblocker that creates a hosts file from multiple sources

Downloads

3,074

Readme

What is this for?

hBlock is a POSIX-compliant shell script that gets a list of domains that serve ads, tracking scripts and malware from multiple sources and creates a hosts file, among other formats, that prevents your system from connecting to them.

:warning: hBlock by default replaces the hosts file of your system, consider making a backup first if you have entries you want to preserve.

Installation

hBlock is available in various package managers. Please check the PACKAGES.md file for an up-to-date list.

The latest available version can also be installed manually by running the following commands:

curl -o /tmp/hblock 'https://raw.githubusercontent.com/hectorm/hblock/v3.4.4/hblock' \
  && echo '7ad94c8525e6076c56b9209ed73d132b8b9600a2e5e9738b3cdc02839d6d4215  /tmp/hblock' | shasum -c \
  && sudo mv /tmp/hblock /usr/local/bin/hblock \
  && sudo chown 0:0 /usr/local/bin/hblock \
  && sudo chmod 755 /usr/local/bin/hblock

Additionally, a systemd timer can be set to regularly update the hosts file for new additions.

Usage

The default behavior of hBlock can be adjusted with multiple options. Use the --help option or check the hblock.1.md file for the full list.

asciicast

Nightly builds

Nightly builds of the hosts file, among other formats, can be found on the hBlock website.

Temporarily disable hBlock

Sometimes you may need to temporarily disable hBlock, a quick option is to generate a hosts file without any blocked domains by running the following command:

hblock -S none -D none

I found a false positive, what should I do?

It's possible that sometimes one of the hBlock sources includes a domain that shouldn't be blocked, in those cases the best way to proceed is to temporarily add said domain to the allowlist and report the problem to the original blocklist author. This way it will also be automatically removed from hBlock within 24h.

To find which blocklist is behind a false positive you can clone the hMirror project and search for that domain. Although please note that not all hMirror blocklists are used by default in hBlock, an updated list of the sources used can be found in the SOURCES.md file.