Skip to content

Instantly share code, notes, and snippets.

View PGP: Kamil Monicz <kamil@monicz.pl>
-----BEGIN PGP PUBLIC KEY BLOCK-----
Comment: User-ID: Kamil Monicz <kamil@monicz.pl>
Comment: Created: 11/13/2021 12:39 AM
Comment: Expires: 1/1/2024 12:00 PM
Comment: Type: 256-bit EdDSA (secret key available)
Comment: Usage: Signing, Encryption, Certifying User-IDs
Comment: Fingerprint: B57034522726AB3DABEB0971F3A5FD85563C1205
mDMEYY77JxYJKwYBBAHaRw8BAQdA5rkOY5pNS9SXIfwIW88ZQeJ7lP+e8eEtejZO
@Zaczero
Zaczero / osm-copy-changeset-ids.user.js
Last active January 29, 2023 05:18
🗺️ Easily copy user's changeset IDs on OpenStreetMap
View osm-copy-changeset-ids.user.js
// ==UserScript==
// @name 🗺️ Easily copy user's changeset IDs on OpenStreetMap
// @namespace Violentmonkey Scripts
// @match https://www.openstreetmap.org/user/*/history
// @grant none
// @version 1.0
// @license GNU Affero General Public License v3.0
// @author Zaczero
// @description 1/29/2023, 5:25:13 AM
// @updateURL https://gist.github.com/Zaczero/f003b0e029b6a0f0fbbf99dfffe6cdba/raw/osm-copy-changeset-ids.user.js
@Zaczero
Zaczero / tor-netscan-mitigation.md
Last active April 24, 2023 16:10
Prevent netscan abuse on your Tor exit node with UFW and Fail2Ban
View tor-netscan-mitigation.md

🧅 Mitigating the Tor netscan problem

This is a guide to my personal solution to the Tor netscan problem, which can affect the reputation of exit nodes. The solution uses ufw, fail2ban, and systemd-journal, but can be adapted to suit your needs. This approach is not perfect, but it helps prevent netscan abuse while still supporting the Tor network.

Overview

The solution works by temporarily banning outgoing traffic to a specific port if too many connections are made in a short period of time. This may affect some legitimate traffic, but due to the anonymous nature of Tor, it's not possible to block specific traffic sources.

@Zaczero
Zaczero / install-certbot-ocsp-fetcher.sh
Last active August 24, 2023 10:13
Simple install script for certbot-ocsp-fetcher on Debian-based distros
View install-certbot-ocsp-fetcher.sh
#!/bin/sh
# This install script is licensed under the Creative Commons Zero 1.0 Universal license.
# For more information, please see <https://creativecommons.org/publicdomain/zero/1.0/>
set -e
if [ "$(id -u)" -ne 0 ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
@Zaczero
Zaczero / osm-deep-history-integration.user.js
Last active September 17, 2023 14:31
🗺️ OSM Deep History integration
View osm-deep-history-integration.user.js
// ==UserScript==
// @name 🗺️ OSM Deep History integration
// @namespace Violentmonkey Scripts
// @match https://www.openstreetmap.org/*
// @grant none
// @version 1.0.3
// @license GNU Affero General Public License v3.0
// @author Zaczero
// @updateURL https://gist.github.com/Zaczero/5e65ccd6c5a26c19d2a83130bc450ae1/raw/osm-deep-history-integration.user.js
// @downloadURL https://gist.github.com/Zaczero/5e65ccd6c5a26c19d2a83130bc450ae1/raw/osm-deep-history-integration.user.js
@Zaczero
Zaczero / README.md
Created September 20, 2023 16:39
NixOS root partition RAID1 using mdadm + LUKS cryptsetup encryption
View README.md

1. Boot into NixOS Live USB

Insert your NixOS live USB and boot into the system.

2. Partition disks

Note: This guide assumes you're using UEFI. If you're using BIOS, the partitioning scheme will differ.

You can use cfdisk to manually partition your disks.