Skip to content

Instantly share code, notes, and snippets.

@Znuff
Znuff / radarr-unmonitor-downloaded.md
Last active May 16, 2023 08:46
Unmonitor Radarr Downloads after 30 Days

Simple Python script to set all downloaded movies to unmonitored after X days (default 30).

Edit the APIKEY, URL and DAYS to your liking. Run on a daily/weekly basis.

Cloudflare doesn't allow disabling IPv6 via their Dashboard any more. This works:

curl -X PATCH "https://api.cloudflare.com/client/v4/zones/<zone-id>/settings/ipv6" \
  -H "X-Auth-Email: <email>" \
  -H "X-Auth-Key: <auth-key>" \
  -H "Content-Type: application/json" \

--data '{"value":"off"}'

@Znuff
Znuff / README.md
Last active September 2, 2020 02:29

This is a simple action for fail2ban that uses Cloudflare's API for Rules & Filters to block IP Addresses.

Usage is simple:

  • Add an IP address to the rule/filter:

    ./fail2cloudflare.py add <ip>
    
  • Delete an IP address from the rule/filter:

#!/bin/bash
explorer_height=$(curl -s https://explorer.gravium.io/api/getblockcount)
latest_hash=$(curl -s https://explorer.gravium.io/api/getblockhash?index=$explorer_height)
block_to_check=$((explorer_height - 3))
explorer_hash=$(curl -s https://explorer.gravium.io/api/getblockhash?index=$block_to_check)
# environment setup, make it pretty
tred=$(tput setaf 1); tgreen=$(tput setaf 2); tyellow=$(tput setaf 3); tblue=$(tput setaf 4); tmagenta=$(tput setaf 5); tcyan=$(tput setaf 6); treset=$(tput sgr0); tclear=$(tput clear); twbg=$(tput setab 7)
@Znuff
Znuff / wif.md
Created May 5, 2018 20:42 — forked from t4sk/wif.md
How to convert private key to WIF

How to convert private key to WIF

0. Overview

WIF = base58check encode ([version byte][private key][checksum])

version byte = 80 for mainnet, ef for testnet and regtest

checksum = first 4 bytes of double SHA256 of private key
#!/bin/bash
explorer_height=$(curl -s http://explorer.coin2fly.com/api/getblockcount)
latest_hash=$(curl -s http://explorer.coin2fly.com/api/getblockhash?index=$explorer_height)
block_to_check=$((explorer_height - 3))
explorer_hash=$(curl -s http://explorer.coin2fly.com/api/getblockhash?index=$block_to_check)
# environment setup, make it pretty
tred=$(tput setaf 1); tgreen=$(tput setaf 2); tyellow=$(tput setaf 3); tblue=$(tput setaf 4); tmagenta=$(tput setaf 5); tcyan=$(tput setaf 6); treset=$(tput sgr0); tclear=$(tput clear); twbg=$(tput setab 7)
#!/bin/bash
RELEASEFILE="https://github.com/exsolution/ext-wallet/releases/download/v1.0.0.0/exsolution-1.0.0-linux64.tar.gz"
daemon="exsolutiond"
cli="exsolution-cli"
stopcli="stop"
archive_path="exsolution-1.0.0/bin/"
core_dir=".exsolution"
config_path="$core_dir/exsolution.conf"
#!/bin/bash
daemon="smartcashd"
cli="smartcash-cli"
stopcli="stop"
# environment setup, make it pretty
tred=$(tput setaf 1)
tgreen=$(tput setaf 2)
tyellow=$(tput setaf 3)
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAqYuIV+WjH4K48SicuYpRWoGHaDsXh+PaqWo6wKv9hh0NVual00f60wtsLRUy7kTlSendi6QzXeFPpQVi+iQFiWjucLY+Mg8LTMjFjTWN1hYhN+0CraAt3Qyn+HvA1tLbTphQTbEA0IvjO5AgBO20v41CPpLrsIPwQmepwHYr+YU= znuffy@gmail.com
#!/bin/bash
RELEASEFILE="https://github.com/Znuff/qbic/releases/download/v1.1.1/qbicd-linux64-v1.1.1.tar.gz"
daemon="qbicd"
cli="qbic-cli"
stopcli="stop"
# environment setup, make it pretty
tred=$(tput setaf 1)