Skip to content

Instantly share code, notes, and snippets.

View nickali's full-sized avatar

Nick Ali nickali

View GitHub Profile
blueprint:
name: ZHA - _TZ3000_an5rjiwd TS0041 Switch
description: Automate your TS0041 Wireless Switch using ZHA events.
domain: automation
input:
ts0041_switch:
name: _TZ3000_an5rjiwd TS0041 Switch
description: _TZ3000_an5rjiwd TS0041 Switch to use
selector:
device:
local gpgGroup = vim.api.nvim_create_augroup("customGpg", { clear = true })
vim.api.nvim_create_autocmd({ "BufReadPre", "FileReadPre" }, {
pattern = "*.gpg",
group = gpgGroup,
callback = function()
-- Make sure nothing is written to shada file while editing an encrypted file.
vim.opt_local.shada = nil
-- We don't want a swap file, as it writes unencrypted data to disk
vim.opt_local.swapfile = false
@nickali
nickali / cf-function-blocker.js
Last active July 30, 2024 15:05
Block AI and SEO bots, scrapers, spiders, and crawlers with Cloudflare Pages Functions
/*
Cloudflare provides the ability to block some AI crawlers and
scrapers. They also maintain a list of bots approved to scan
sites: https://radar.cloudflare.com/traffic/verified-bots.
There are plenty of sites on the verified list I would like to block,
plus other SEO crawlers.