Skip to content

Instantly share code, notes, and snippets.


Jon "The Nice Guy" Spriggs JonTheNiceGuy

View GitHub Profile
View tail and find.txt
/---------------------------------------------------- Read the following file. Usually just the last 10 characters, but options
| follow.
| /---------------------------------------------- Follow the file, without stopping when it gets to the end of the "defined"
| | size to read.
| | /------------------------------------------- Define the number of lines to read.
| | | /----------------------------------------- Don't read any lines (-n 0) In this case because you might be following
| | | | binary files!
| | | | /--------------------------------------- $() executes the comand within the braces, and uses "STDOUT" as this value.
| | | | | /------------------------------------- Find lists all the files (or directories) which match the criteria.
| | | | | | /-------------------------------- The path to look for files in. All files

Jekyll Git Status

Installing this plugin

  1. Create a _plugins directory in the root of your Jekyll site.
  2. Place the ruby script into that directory. This can be done by either:
    1. Downloading the "raw" version of the jekyll-git-status.rb into that directory.
    2. Cloning this gist into that directory as a submodule.
    3. Creating a new file, with the extension .rb in that path, and pasting in the content below.
JonTheNiceGuy / The
Last active Jul 1, 2020
Transcribed rules for Scotland Yard (lightly edited for clarity), based on the scan at
View The

Scotland Yard
A compelling detective game

For 3 to 6 Players

The Scene

Mr. X, a most-wanted criminal is on the run in Central London and Scotland Yard's finest detectives are in hot persuit. To escape capture, Mr. X must move cleverly and secretly (Mr. X's whereabouts are revealed only as many as 5 times during the game); to corner Mr. X, the detectives must use ingenuity and cooperation.

One player is Mr. X. All other players are the detectives. Whether one is being chased or doing the chasing, all players travel from location to location by bus, taxi or underground. To take a certain form of transportation, you must be on the correct boarding spot and have the correct fare - no ticket, no ride!

JonTheNiceGuy / AAA_Readme for
Created Jun 5, 2020
A simple script to upgrade all wordpress components in cron
View AAA_Readme for

A simple tool to update and upgrade Wordpress components

A few years ago, I hosted my blog on Dreamhost. They've customized something inside the blog which means it doesn't automatically update itself. I've long since moved this blog off to my own hosting, but I can't figure out which thing it was they changed, and I've got so much content and stuff in here, I don't really want to mess with it.

Anyway, I like keeping my systems up to date, and I hate logging into a blog and finding updates are pending, so I wrote this script. It uses wp-cli which I have installed to /usr/local/bin/wp as per the install guide.

JonTheNiceGuy /
Last active May 12, 2020
Canon MG3050 Printer Ink Level reporting tool
function matchIP() {
# These regex based on
if echo "$1" | egrep '^((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])$' >/dev/null 2>/dev/null
echo 4
return 4
elif echo "$1" | egrep '(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,
View Vagrant + Multi-Node MicroK8S -

Using Vagrant with Multi-Node MicroK8S to experiment with Kubernetes

This script (using Vagrant) is used to build a pair of Ubuntu based virtual machines that have the MicroK8S setup of Kubernetes.

It also installs docker, and sets up aliases for kubectl in line with the MicroK8S documentation.

Please note that this script relies on the fact that Vagrant transfers files in /vagrant to the host file system, which we can then use to setup the second node.

JonTheNiceGuy / Vagrant + MicroK8S -
Last active Oct 2, 2020
Using Vagrant with MicroK8S to experiment with Kubernetes
View Vagrant + MicroK8S -
JonTheNiceGuy /
Created Dec 17, 2019
Create CA and Client Certificates on a protected CA Server, and transfer to them to your nodes, using Ansible

Create CA and Client Certificates on a protected CA Server, and transfer to them to your nodes, using Ansible

This is based on

It has been used in $my_service to generate client certificates on a protected Certificate Authority (CA) server (accessible only to my Ansible Tower/AWX server) and is then distributed to the client nodes.

View 0.

Thoughts on #SameAs


I am not a particularly good coder. As such take these as a suggestion of what could be, not what is happening! If this were to be accepted, it would need to be adopted by all the SSB clients (ssb-server, manyverse, etc). Also, this may be extremely simplistic and may produce far too many messages to the pool very quickly!

I asked on the Scuttlebutt IRC channel, and it was suggested that @MixMix might be interested in this?