Skip to content

Instantly share code, notes, and snippets.

View nglgzz's full-sized avatar

Angelo Gazzola nglgzz

View GitHub Profile
@ansemjo
ansemjo / aur-package-hooks.md
Last active April 30, 2025 20:04
Git hooks for AUR package repositories to test your PKGBUILD before pushing.

AUR package hooks

These hooks are meant to be used in Git repositories that track PKGBUILD files for the Arch User Repository. Place them in .git/hooks/pre-{commit|push} and make sure they're executable.

pre-commit

This hook simply updates the .SRCINFO before every commit by running:

@Pandry
Pandry / Firewalld GeoIP firewall script
Last active May 10, 2026 09:16
Block countries IPs via Firewalld
#!/bin/bash
##
# Name: GeoIP Firewall script
# Author: Pandry
# Version: 0.1.1
# Description: This is a simple script that will set up a GeoIP firewall blocking all the zones excecpt the specified ones
# it is possible to add the whitelisted zones @ line 47
# Additional notes: Usage of [iprange](https://github.com/firehol/iprange) is suggested
# for best performances
@magnetikonline
magnetikonline / README.md
Last active May 8, 2026 14:00
Bash string manipulation cheatsheet.

Bash string manipulation cheatsheet

Assignment
Assign value to variable if variable is not already set, value is returned.

Combine with a : no-op to discard/ignore return value.
${variable="value"}
: ${variable="value"}