Skip to content

Instantly share code, notes, and snippets.

Gerard Kanters gerard-kanters

Block or report user

Report or block gerard-kanters

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
gerard-kanters / spamhaus-fwd-ipset.txt
Last active Nov 11, 2018
Spamhaus with firewalld and ipset
View spamhaus-fwd-ipset.txt
# Script downloads monthly spammers, max 2 per day and adds them via ipset to firewalld
#Choose the number of days your would like to download, choices are 1,30,90,180,365
# list of known spammers
# save local copy here
gerard-kanters / xenserver-centos7
Last active Aug 6, 2018
Increase disk on Xenserver with Centos 7
View xenserver-centos7
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
gerard-kanters /
Last active Dec 12, 2016 — forked from imatpro/
Shell script to purge Rundeck execution history
# keep last 6000 executions for each job, about 1 week if running minute jobs
cd /var/lib/rundeck/logs/rundeck
JOBS=`find . -maxdepth 3 -path "*/job/*" -type d`
gerard-kanters / Mautic code
Last active Dec 11, 2015
Mautic code for MyVox (you need to extend head in an existing plugin or creat a new plugin)
View Mautic code
//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= "'$page_url'&page_title='$page_title'&email='$email'";
gerard-kanters / inactivity.js
Last active Jan 28, 2020
Inactivity timeout javascript
View inactivity.js
<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
gerard-kanters / solr
Created Oct 15, 2014
View solr
# Script for running solr as a service under initd.
# Requires solr.conf and solr.start
# Usage: service solr {start|stop|restart|status}"
# Provides: solr
# Required-Start:
gerard-kanters / solr.conf
Last active Aug 29, 2015
View solr.conf
# 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.
gerard-kanters / solr.start
Created Oct 15, 2014
solr.start (put in /var/lib/)
View solr.start
# 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
gerard-kanters / server.ini
Last active Sep 18, 2016
HHVM server ini
View server.ini
;extension = /usr/lib64/php/modules/
hhvm.pid_file = "/var/run/hhvm/"
hhvm.server.port = 9000
hhvm.server.fix_path_info = true
hhvm.server.type = fastcgi
hhvm.server.enable_magic_quotes_gpc = false
hhvm.server.enable_keep_alive = true
hhvm.server.enable_ssl = true
hhvm.log.access_log_default_format = "%h %l %u %t \"%r\" %>s %b"
gerard-kanters / hhvm
Last active Jan 26, 2017
HHVM init script
View hhvm
# hhvm Startup script for the HipHop Server
# chkconfig: - 85 15
# description: HHVM is an open-source virtual machine designed for executing programs written in Hack and PHP
# processname: hhvm
# config: /etc/php.ini
# config: /etc/hhvm/server.ini
# pidfile: /var/run/hhvm/
You can’t perform that action at this time.