Skip to content

Instantly share code, notes, and snippets.

npilk / custom-web-search.js
Created January 17, 2022 22:04
Cloudflare Worker script for customizing web search
View custom-web-search.js
// Cloudflare Worker script to automatically redirect search queries based on trigger words
addEventListener("fetch", event => {
// status code for redirect response; need something that won't cache
var statuscode = 303
npilk /
Created April 25, 2022 17:42
python script that toggles DNS blocking when a landline phone is taken on or off the hook (using a Raspberry Pi + door sensor)
import RPi.GPIO as GPIO
import time
import subprocess
# input/output setup for the door sensor
GPIO.setup(7, GPIO.IN, pull_up_down = GPIO.PUD_UP)
is_off_hook = None
old_off_hook = None