Skip to content

Instantly share code, notes, and snippets.

View jontey's full-sized avatar

Jonathan Tey jontey

View GitHub Profile
@jontey
jontey / traefik-auth.conf
Created December 6, 2022 09:41 — forked from acundari/traefik-auth.conf
Traefik fail2ban
# /etc/fail2ban/filter.d/traefik-auth.conf
[Definition]
failregex = ^<HOST> \- \S+ \[\] \"(GET|POST|HEAD) .+\" 401 .+$
@jontey
jontey / rsync_parallel.sh
Created April 15, 2020 01:44 — forked from reijovosu/rsync_parallel.sh
Parallel-ise an rsync transfer when you want multiple concurrent transfers happening,
#!/bin/bash
set -e
# Usage:
# rsync_parallel.sh [--parallel=N] [rsync args...]
#
# Options:
# --parallel=N Use N parallel processes for transfer. Defaults to 10.
#
# Notes:
@jontey
jontey / mojave.xml
Last active December 17, 2019 15:28 — forked from trongthanh/mojave.xml
macOS Mojave dynamic background re-implement as GTK+ background slideshow. Background images are changed to reflect the time of the day.
<!-- Instructions:
- Download and unzip Mojave dynamic background here: https://files.rb.gd/mojave_dynamic.zip
- Rename the extracted folder as "mojave-background" (Excuse the trouble but I renamed it on my machine and already use that path in the XML file)
- Save this xml file next to the Mojave background files
- Fix the path to the background images below (better using absolute path)
- Lastly, either:
+ GNOME: Use gnome-tweaks tool to select this XML as wallpaper (as default wallpaper settings won't let you choose wallpaper from custom path)
+ MATE: Go to background setting (in Appearance) > Choose +Add... > make sure **All files** filter is selected at the bottom right > Then choose mojave.xml
-->
<background>
@jontey
jontey / hosts
Created December 2, 2019 04:47 — forked from alrik11es/manage-etc-hosts.sh
Bash Script to Manage /etc/hosts file for adding/removing hostnames.
#!/usr/bin/env bash
# sudo apt-get install -y nscd
set -eu
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi