This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## Get the crontab line for the Borg Backup job on each running LXC | |
# Get the vm list | |
vms="$(lxc-ls -1 --running)" | |
for v in $vms | |
do | |
echo "$v" | |
lxc-attach -n "$v" -- /bin/bash -c "crontab -l | grep borg" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Mount/umount user's personal backup borg repository | |
# Zenity version | |
# @bolorino | |
CONFIG_REPO_FILE=~/.config/backups/repo-$USER.conf | |
if [ ! -f "$CONFIG_REPO_FILE" ]; then | |
zenity --error --width 300 --text "Config file missing." | |
exit 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Send a notification through Pushover when a process finish. | |
# Usage: ended.sh pid 'message to send' | |
# @bolorino | |
# Pushover: https://pushover.net/ | |
pid=$1 | |
MESSAGE="$2" | |
TOKEN=your-pushover-app-token | |
USER=your-pushover-user-key |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# process-pdfs.sh | |
# | |
# por Jose Bolorino | |
# https://github.com/bolorino | |
# | |
################ | |
# Procesa un directorio con archivos PDF para: | |
# 1.- Separar los archivos de varias páginas en varios archivos de 1 sola página |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/fail2ban/filter.d/xmlrpc.conf | |
[Definition] | |
failregex = ^<HOST> .*POST .*xmlrpc\.php.* | |
ignoreregex = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/fail2ban/filter.d/wordpress-auth.conf | |
[Definition] | |
failregex = <HOST>.*POST.*(wp-login\.php|xmlrpc\.php).* 403 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[wordpress] | |
enabled = true | |
port = http,https | |
filter = wordpress-auth | |
logpath = /var/log/nginx/access.log | |
maxretry = 3 | |
bantime = 3600 | |
[xmlrpc] | |
enabled = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*filter | |
# Allow all loopback (lo0) traffic and drop all traffic to 127/8 that doesn't use lo0 | |
-A INPUT -i lo -j ACCEPT | |
-A INPUT -d 127.0.0.0/8 -j REJECT | |
# Accept all established inbound connections | |
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT | |
# Allow all outbound traffic - you can modify this to only allow certain traffic |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Security Auth | |
* Plugin URI: http://kovshenin.com/2014/fail2ban-wordpress-nginx/ | |
* Description: Enable 403 status on login failed. | |
* Tags: security, login | |
* Version: 1.0 | |
* License: GPLv2 | |
* Author: Konstantin Kovshenin | |
* Author URI: http://kovshenin.com/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** Theatre WP | |
* Get Performance Custom Data | |
* within the loop | |
**/ | |
$performance_custom = $theatre_wp->get_performance_custom( get_the_ID() ); | |
/** Array returns | |
* $performance_custom['spectacle_id'] |
NewerOlder