Skip to content

Instantly share code, notes, and snippets.

mrverrall

Block or report user

Report or block mrverrall

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
View pf_active_clients
#!/bin/bash
: << =cut
=head1 NAME
Packetfence Clients
=head1 AUTHOR
View gist:ac6aa97c427faf7ebab1616018115ff5
# Local and established are just fine
-A INPUT -i lo -j ACCEPT
-A INPUT -d 127.0.0.0/8 ! -i lo -j REJECT --reject-with icmp-port-unreachable
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
# SSH Rate Limiting
-I INPUT -p tcp --dport 22 -m state --state NEW -m recent --set
-I INPUT -p tcp --dport 22 -m state --state NEW -m recent --update --seconds 60 --hitcount 3 -j DROP
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
View build-theme-cache.php
<?php
# For Moodle 3.3
# This script belongs in ./admin/cli/
# Copyright 2017 Paul Verrall
define('CLI_SCRIPT', true);
require(__DIR__.'/../../config.php');
require_once($CFG->dirroot.'/lib/csslib.php');
View keybase.md

Keybase proof

I hereby claim:

  • I am mrverrall on github.
  • I am mrverrall (https://keybase.io/mrverrall) on keybase.
  • I have a public key ASD1zgZPt7UftFI0emlJP1DCXJb47n5VQln14qgbOzV0Ugo

To claim this, I am signing this object:

View gist:d2c108b2afe71070e81c8b14bd26caf0
verrall@syenite:~$ wget -S -O /dev/null http://moopi.uk/index.html
--2016-04-25 16:23:52-- http://moopi.uk/index.html
Resolving moopi.uk (moopi.uk)... 2a01:8900:0:2::902
Connecting to moopi.uk (moopi.uk)|2a01:8900:0:2::902|:80... connected.
HTTP request sent, awaiting response...
HTTP/1.1 301 Moved Permanently
Server: nginx/1.9.10
Date: Mon, 25 Apr 2016 15:23:52 GMT
Content-Type: text/html
Content-Length: 185
@mrverrall
mrverrall / rhel7-moodle.sh
Last active Apr 23, 2019
A script that installs and configures all the core components for moodle on RHEL/Centos 7 leaving you with a running site complete with AV scanning and Memcached
View rhel7-moodle.sh
#!/bin/bash
#
# This Bash script installs Moodle (http://moodle.org) and all it's
# requirements into a freshly installed Centos or RHEL 7 operating system.
# It assumes an 'Enforced' SELinux environment and configures the system
# accordingly.
#
# It is designed to be instructional and clear to read to persons unfamiliar
# with Bash and as such does *no* sanity checking before taking actions.
# Becasue of this *great* care should be taken if you feel the urge to run
View day_night_switch.py
from energenie import switch_on, switch_off
import ephem
sun = ephem.Sun()
home = ephem.Observer()
home.lat='54.047'
home.long='-2.8010'
last_rise = home.previous_rising(sun)
last_set = home.previous_setting(sun)
View gist:dbef5202921872abdf05
Delivered-To: paul.verrall@luns.net.uk
Received: by 10.114.68.84 with SMTP id u20csp394118ldt;
Wed, 8 Oct 2014 01:22:01 -0700 (PDT)
X-Received: by 10.50.143.105 with SMTP id sd9mr13572922igb.19.1412756520555;
Wed, 08 Oct 2014 01:22:00 -0700 (PDT)
Return-Path: <bounce+c056e3.f903d-paul.verrall=luns.net.uk@scholarpacksupport.com>
Received: from do158-64.mailgun.net (do158-64.mailgun.net. [192.237.158.64])
by mx.google.com with ESMTPS id uu7si1935521icb.0.2014.10.08.01.21.59
for <paul.verrall@luns.net.uk>
(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
@mrverrall
mrverrall / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View gist:7825807
868 clarkema@odin:~ > cat foo
weather.bbc.co.uk
bbc.co.uk
news.bbc.co.uk
869 clarkema@odin:~ > cat foo | perl -waln -F'\.' -e 'print join ".", reverse @F' | sort
uk.co.bbc
uk.co.bbc.news
uk.co.bbc.weather
You can’t perform that action at this time.