Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
basedir=".."
outputdir="output/bind9"
path="${basedir}/cache_domains.json"
nameserver="ns1.yourdomain.com."
# Ensure jq is installed
if ! command -v jq &> /dev/null; then
echo "jq is not installed. Please install jq to continue."
exit 1

Keybase proof

I hereby claim:

  • I am oct8l on github.
  • I am oct8l (https://keybase.io/oct8l) on keybase.
  • I have a public key ASC9KK1OJgU_mC6iv411O10GdHJkndZbAgraz2TasAdFYwo

To claim this, I am signing this object:

@oct8l
oct8l / readme.md
Created January 11, 2019 17:23 — forked from eddiewebb/readme.md
Hugo JS Searching with Fuse.js
@oct8l
oct8l / adblock.md
Last active February 23, 2019 23:18
Tablespoon's adblocker info and instructions for OpenWrt

I flashed OpenWrt onto my router and wrote a script which prevents ads from being displayed on any devices on my network that use DNS to find them on the internet. Chromecasts, phones, tablets, PCs, and (probably?) Rokus (I don't have one to test with) can now all reach an ad-free internet without users needing to install any addons at all. I'll link to my script on github if anybody's interested in duplicating my setup.

Edit: Okay, the script is at https://github.com/tablespoon/fun/blob/master/adblocker.sh It's written in such a way that installation is very simple: just place it anywhere permanent on the filesystem (don't place it in /tmp -- this is tmpfs in OpenWrt, and will be cleared if the router loses power or reboots. In my example below, I save it to root's home) and run it once. It