Skip to content

Instantly share code, notes, and snippets.

npilk / custom-web-search.js
Created Jan 17, 2022
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 Apr 25, 2022
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