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
//GeoIP gebruiken om contact pagina te beschermen tegen spammers | |
// Dynamisch pad bepalen voor Composer autoload | |
$autoload_path = ABSPATH . 'vendor/autoload.php'; | |
if (!file_exists($autoload_path)) { | |
error_log('Composer autoload.php niet gevonden. Controleer of Composer correct is geïnstalleerd.'); | |
return; // Stop het script als Composer niet beschikbaar is | |
} |
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
//Let Google index search pages, otherwise following links will also stop | |
function index_search_robots ($robots) { | |
if ( is_search() ) { | |
return 'index,follow'; | |
} | |
return $robots; | |
} | |
add_filter( 'wpseo_robots', 'index_search_robots' ); |
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 | |
# Script downloads monthly spammers and adds them via ipset to firewalld. Add this script in /etc/cron.daily and make it executable (chmod +x /etc/cron.daily/stopforumspam.sh) | |
#Inital command to create ipset, run once | |
#ipset create dailyspam hash:ip maxelem 16777216 | |
#Add set to firewalld | |
#firewall-cmd --permanent --new-ipset=dailyspam --type=hash:ip --option=maxelem=16777216 | |
#firewall-cmd --permanent --add-rich-rule='rule source ipset=dailyspam log prefix="spam" level="debug" limit value="1/h" drop' | |
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
Bring down the VM with XenCenter | |
Go to storage and change storage size of the VM in properties. In this case 160GB | |
Boot VM with XenCenter or #reboot | |
Change the run level to single user mode | |
#init 1 | |
Show partitions | |
#fdisk -l |
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 | |
# keep last 6000 executions for each job, about 1 week if running minute jobs | |
KEEP=6000 | |
cd /var/lib/rundeck/logs/rundeck | |
JOBS=`find . -maxdepth 3 -path "*/job/*" -type d` |
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
//Mautic programmatic marketing | |
$page_url = 'http://' . $_SERVER[HTTP_HOST] . $_SERVER['REQUEST_URI']; | |
$page_title = urlencode($title); | |
if(myvox_is_logged_in()) { | |
$muser = myvox_get_logged_in_user_entity(); | |
$email = urlencode($muser->email); | |
} else { | |
$email = ""; | |
} | |
$src= "http://mautic.netcare.nl/mtracking.gif?page_url='$page_url'&page_title='$page_title'&email='$email'"; |
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
<script type="text/javascript"> | |
function idleTimer() { | |
var t; | |
//window.onload = resetTimer; | |
window.onmousemove = resetTimer; // catches mouse movements | |
window.onmousedown = resetTimer; // catches mouse movements | |
window.onclick = resetTimer; // catches mouse clicks | |
window.onscroll = resetTimer; // catches scrolling | |
window.onkeypress = resetTimer; //catches keyboard actions |
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 | |
# Script for running solr as a service under initd. | |
# | |
# Requires solr.conf and solr.start | |
# Usage: service solr {start|stop|restart|status}" | |
# | |
#----------------------------------------------------- | |
### BEGIN INIT INFO | |
# Provides: solr | |
# Required-Start: |
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
#----------------------------------------------------- | |
# solr-initd v0.5.1 | |
#----------------------------------------------------- | |
# Configuration for solr.init. Copy this to: | |
# | |
# /etc/solr.conf | |
# | |
# NOTE: if you are installing this somewhere else then | |
# you need to alter solr.start and solr.initd. | |
# |
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 | |
#----------------------------------------------------- | |
# solr-initd v0.5.1 | |
#----------------------------------------------------- | |
# Starts solr and writes a pid file. Meant | |
# to be used with the initd script but this | |
# can be used on it's own | |
# | |
# Requires /etc/solr.conf | |
# Usage: ./solr.start |
NewerOlder