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
PID=`ps -ef | grep "PROCESSNAME" | grep -v "grep" | awk '{print $2}'` | |
for i in $PID; do sleep 1; | |
sudo /usr/bin/renice +10 $i; | |
done |
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 | |
# Quick and dirty script to check and notify me when a Twitch channel gets Affiliate status. | |
# https://github.com/KuJoe | |
$lockfile = '/DIR/TO/FILE.LOCK'; | |
if (file_exists($lockfile)) { | |
exit; | |
} else { |
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 | |
require_once '../users/init.php'; | |
require_once $abs_us_root.$us_url_root.'users/includes/template/prep.php'; | |
if (!securePage($_SERVER['PHP_SELF'])) { | |
die(); | |
} | |
?> |
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
WEB_SYSTEM='apache2' | |
WEB_RGROUPS='www-data' | |
WEB_PORT='8080' | |
WEB_SSL_PORT='8443' | |
WEB_SSL='mod_ssl' | |
PROXY_SYSTEM='nginx' | |
PROXY_PORT='80' | |
PROXY_SSL_PORT='443' | |
STATS_SYSTEM='awstats' | |
WEB_BACKEND='php-fpm' |
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
[11:43:38] [Server thread/ERROR]: Could not load 'plugins/LuckPerms-Bukkit-5.3.48.jar' in folder 'plugins' | |
org.bukkit.plugin.InvalidPluginException: me.lucko.luckperms.common.loader.LoadingException: Unable to create a temporary file | |
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:157) ~[patched_1.17.jar:git-Paper-69] | |
at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:414) ~[patched_1.17.jar:git-Paper-69] | |
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:322) ~[patched_1.17.jar:git-Paper-69] | |
at org.bukkit.craftbukkit.v1_17_R1.CraftServer.loadPlugins(CraftServer.java:393) ~[patched_1.17.jar:git-Paper-69] | |
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:275) ~[patched_1.17.jar:git-Paper-69] | |
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1118) ~[patched_1.17.jar:git-Paper-69] | |
at net.minecraft.server.MinecraftServer.lambd |
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 | |
/usr/bin/wget -q -O - "https://www.dan.me.uk/torlist/?exit" -U SXTorBlocker/1.0 > /tmp/temp_tor_list | |
/usr/bin/wget -q -O - "https://check.torproject.org/cgi-bin/TorBulkExitList.py?ip=$IP_ADDRESS&port=80" -U NoSuchBrowser/1.0 >> /tmp/temp_tor_list | |
/usr/bin/wget -q -O - "https://check.torproject.org/cgi-bin/TorBulkExitList.py?ip=$IP_ADDRESS&port=9998" -U NoSuchBrowser/1.0 >> /tmp/temp_tor_list | |
/usr/bin/cat /tmp/temp_tor_list | grep -v ":" | grep -v "#" > /tmp/torlist | |
/usr/bin/sort -u /tmp/torlist > /tmp/nginxtorlist | |
/usr/bin/sed "s/^/deny /g; s/$/;/g" /tmp/nginxtorlist > /etc/nginx/block-tor.txt | |
/usr/bin/systemctl reload nginx |
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
function ajax_file_upload(file_obj) { | |
if(file_obj != undefined) { | |
$("h2").text("Starting upload..."); | |
var form_data = new FormData(); | |
for(i=0; i<file_obj.length; i++) { | |
if (!isImage(file_obj[i].name)) { | |
return failValidation("ext"); | |
} | |
if (!validateSize(file_obj[i].size)) { | |
return failValidation("size"); |
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
### | |
# | |
# This script runs robocopy jobs in parallel by increasing the number of outstanding i/o's to the copy process. Even though you can | |
# change the number of threads using the "/mt:#" parameter, your backups will run faster by adding two or more jobs to your | |
# original set. | |
# | |
# To do this, you need to subdivide the work into directories. That is, each job will recurse the directory until completed. | |
# The ideal case is to have 100's of directories as the root of the backup. Simply change $src to get | |
# the list of folders to backup and the list is used to feed $ScriptBlock. | |
# |
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 | |
CLOUDFLARE_FILE_PATH=${1:-/etc/nginx/conf.d/cloudflare.conf} | |
echo "#Cloudflare" > $CLOUDFLARE_FILE_PATH; | |
echo "" >> $CLOUDFLARE_FILE_PATH; | |
echo "# - IPv4" >> $CLOUDFLARE_FILE_PATH; | |
for i in `curl -s -L https://www.cloudflare.com/ips-v4`; do | |
echo "set_real_ip_from $i;" >> $CLOUDFLARE_FILE_PATH; |
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
server { | |
server_name example.com; | |
access_log off; | |
error_log off; | |
location / { | |
proxy_pass http://my.synology.ddns | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header Host $host; |
OlderNewer