This file contains 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
# You should change "XX.XX.XX.XX" to you wireguard server | |
# and set public-key,private-key,preshared-key,"YY.YY.YY.YY/YY" according to your config | |
/interface/wireguard/add name=wg0 private-key="[PRIVATE_KEY_HERE]" | |
/interface/wireguard/peers/add interface=wg0 endpoint-address=XX.XX.XX.XX endpoint-port=12321 public-key="[PUBLIC_KEY_HERE]" preshared-key="[PRESHARED_KEY_HERE]" persistent-keepalive=25s allowed-address=0.0.0.0/0 | |
/ip/address/add interface=wg0 address=YY.YY.YY.YY/YY | |
/ip/route/add dst-address=XX.XX.XX.XX comment=wgserver disabled=yes |
This file contains 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 | |
cd ~ | |
wget https://github.com/prometheus/prometheus/releases/download/v2.34.0/prometheus-2.34.0.linux-amd64.tar.gz | |
tar -xvf prometheus-2.34.0.linux-amd64.tar.gz | |
cd prometheus-2.34.0.linux-amd64 | |
sudo mkdir -p /etc/prometheus | |
sudo mkdir -p /var/lib/prometheus | |
sudo mv prometheus promtool /usr/local/bin/ |
This file contains 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 | |
WANIP=$(dig TXT +short o-o.myaddr.l.google.com @ns1.google.com | awk -F'"' '{ print $2}') | |
WANGEO=$(geoiplookup $WANIP | cut -d ' ' -f 4,5) | |
echo $WANIP | |
echo $WANGEO |
This file contains 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 | |
/* | |
* Author: https://github.com/olex0r | |
* | |
* Fix permalink of categories matching primary category in aio seo plugin (All in One SEO Pack) | |
* This code snippet is a WordPress filter that modifies the permalink (URL) of product categories | |
* in the WooCommerce plugin when the "All in One SEO Pack" (AIO SEO) plugin is active. It ensures | |
* that the permalink for a category matches the primary category set by the AIO SEO plugin | |
* for a specific product. | |
* |