Skip to content

Instantly share code, notes, and snippets.

@jezman
jezman / GeoIP Block NGINX Debian 12.md
Last active September 17, 2025 09:54 — forked from dunderrrrrr/GeoIP Block NGINX Ubuntu 20.04.md
Allow or block GeoIP except LAN in Nginx on Debian 12

GeoIP Block NGINX Debian 12

Block or filter IPs based on location except lan ips in Nginx (tested on 1.22.1) on Debian 12.

Install Nginx modules

To make use of the geographical filtering, we must first install the Nginx GeoIP module as well as the GeoIP database containing the mappings between visitors’ IP addresses and their respective countries. To do so, let’s execute:

$ sudo apt install libnginx-mod-http-geoip geoip-database
@jezman
jezman / create_repo
Last active August 14, 2018 11:51 — forked from simbalinux/create_repo
create_repo
#!/usr/bin/env bash
repo_name=$1
test -z $repo_name && echo "Repo name required." 1>&2 && exit 1
curl -XPOST -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/user/repos -d "{\"name\":\"$repo_name\"}"
@jezman
jezman / arch-linux-install
Last active April 10, 2017 10:03 — forked from mattiaslundberg/arch-linux-install
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Create partitions