Skip to content

Instantly share code, notes, and snippets.

@tyzbit
tyzbit / get-available-tech-tlds.sh
Created November 29, 2023 21:20
Simple scripts to check domain availability (from the list of cloudflare's TLDs https://www.cloudflare.com/tld-policies/)
#!/bin/bash
cloudflare_supported_tlds=(
academy
agency
app
blog
cam
camera
center
chat
@tyzbit
tyzbit / README.md
Last active October 31, 2023 21:49 — forked from vasturiano/.blocks.json
The Lightning Network (Mainnet)

Forked from vasturiano, with dataset and minor other changes.

The Lightning Network as seen from my node at about 18:49 UTC on 1-28-2018.

Nodes are colored according to settings set by the node operators. Lines are channels between nodes. Nodes that fly off into the background do not have any visible channels. Line colors are representative of the channel capacity, but is colored dynamically.

@tyzbit
tyzbit / custom-config.conf
Created August 22, 2023 20:31
Setting cache-max-negative-ttl for Unbound on OPNSense 21.7 and later
cache-max-negative-ttl: 1
@tyzbit
tyzbit / json
Created August 17, 2023 19:36
n8n Plex to NewRelic workflow
{
"meta": {
"instanceId": "aa9435bb3ce60270561861142bd6fad2007ec1f2f21b7e4ae8cd074b32d19840"
},
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
@tyzbit
tyzbit / recurringjobs.yml
Last active August 11, 2023 13:20
Longhorn RecurringJobs
## The purpose of snapshots and backups are to be able to restore data to the last known good state
## either due to full data loss or corruption/unwanted data change
## Data properties:
## - Can change slowly or quickly.
## If the data changes quickly, we must snapshot/backup more frequently. We must also retain more.
## If the data changes slowly, we can snapshot less frequently
## - Is low priority or high priority.
## Low priority means we don't need offsite backups
## Medium priority means we need an offsite backup
## High priority means we need multiple historical offsite backups
@tyzbit
tyzbit / hosts
Last active August 6, 2023 13:16
Windows 10 Ad/Telemetry (for https://github.com/StevenBlack/hosts/)
127.0.0.1 a-0001.a-msedge.net
127.0.0.1 a-0001.dc-msedge.net
127.0.0.1 a-0002.a-msedge.net
127.0.0.1 a-0003.dc-msedge.net
127.0.0.1 a-0004.a-msedge.net
127.0.0.1 a-0005.a-msedge.net
127.0.0.1 a-0006.a-msedge.net
127.0.0.1 a-0007.a-msedge.net
127.0.0.1 a-0008.a-msedge.net
127.0.0.1 a-0009.a-msedge.net
@tyzbit
tyzbit / bootstrap-ubuntu.sh
Last active July 17, 2023 14:03
bootstrap-ubuntu-server
#!/bin/bash
## Edit sudoers (add "NOPASSWD:" to the sudo line before ALL)
## Add optional: true to netplan and apply
## Add Google Kubernetes key
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys B53DC80D13EDEF05
# Install Docker
@tyzbit
tyzbit / cache-eks-token.sh
Created January 23, 2020 16:36
Cache EKS tokens for kubectl
function usage() {
echo "Usage: $0 [region] [cluster name] [role arn]"
echo "If you're not using a role, [region] and [role arn] are optional"
echo "If you just use cluster name, you need aws-iam-authenticator installed"
}
if [ -z $1 ]; then
usage
exit 1
fi
@tyzbit
tyzbit / app@.service
Created July 10, 2023 20:40
Docker-Compose Systemd script
[Unit]
Description=%i service
Requires=docker.service
After=docker.service
[Service]
Restart=always
User=root
Group=docker
WorkingDirectory=/services/%i
@tyzbit
tyzbit / custom_host_lua_script.lua
Last active June 27, 2023 23:58
OPNSense ntopng call webhook when in a Google Meet
-- /usr/local/share/ntopng/scripts/callbacks/checks/hosts/custom_host_lua_script.lua
if (host.name() == "meet.google.com") then
local response, err = ntop.httpGet("https://home-assistant-url/api/webhook/webhook-url")
if err then
print("Webhook request for meet.google.com match failed: " .. err)
end
print("Active Google Meet in progress")
end
-- IMPORTANT: do not forget this return at the end of the script