- Create a
_pluginsdirectory in the root of your Jekyll site. - Place the ruby script into that directory. This can be done by either:
- Downloading the "raw" version of the
jekyll-git-status.rbinto that directory. - Cloning this gist into that directory as a submodule.
- Creating a new file, with the extension
.rbin that path, and pasting in the content below.
- Downloading the "raw" version of the
| /---------------------------------------------------- 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 |
For 3 to 6 Players
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!
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.
| #!/bin/bash | |
| rc=0 | |
| function matchIP() { | |
| # These regex based on https://stackoverflow.com/a/17871737 | |
| 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 | |
| then | |
| 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, | |
| 4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((: |
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.
This Virtual Machine (using Vagrant) to build an Ubuntu based virtual machine that has the MicroK8S setup of Kubernetes.
It also installs docker, and sets up aliases for kubectl in line with the MicroK8S documentation.
Initially this should be functionally similar to MiniKube.
If you want a multi-node similar environment, here's a similar repository.
Create CA and Client Certificates on a protected CA Server, and transfer to them to your nodes, using Ansible
This is based on https://kapuablog.wordpress.com/2019/11/26/ansible-reading-a-remote-yaml-file/
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.
Hmm, annoying. I was hoping to be able to say "if this isn't a list, and isn't a dict, then it might be a string" but instead "is sequence" returns true for list and dict and string... https://gist.github.com/JonTheNiceGuy/d19c26ed6ff7621fde1e84ceda8a473f
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?