Skip to content

Instantly share code, notes, and snippets.

View marcus-downing's full-sized avatar

Marcus Downing marcus-downing

View GitHub Profile
The stink rising from the water was overpowering. He sunk his hands in, caressing the head of the alien, checking the electrodes. Around him other operators were caring for the dozens of others. They all worked with care, since their lives depended on the minds of these strange captives.
It would be so easy to rip that little piece of metal out of the ugly beast's head. If only the others weren't here to see.
He lingered too long, or his hands gripped too tight, and the beast moved in its sleep, splashing water on his slippers and slicking the metal walkway. He stood up too quickly
"Hey, be careful there," said his supervisor. "You know they don't like too much contact. Check the plugs and move onto the next one."
"Sorry, sir."
@marcus-downing
marcus-downing / make-prompts.js
Last active February 10, 2020 22:01
Scripts for making randomised prompts for a writing contest.
#!/usr/bin/env node
/*
Make prompts
Creates a set of randomised prompt cards with five tiles each.
Requires a `tiles.csv` file in the format: id,title,group,desc,crop,img
where group is one of: race, character, location, concept, combo.
Requires a `tiles` folder with images as created by `make-tiles.js`
@marcus-downing
marcus-downing / channel-energy.template.yml
Last active June 14, 2018 09:20
Sample class descriptors in YAML
template: channel-energy
elems:
- field: channel-energy--type
type: choice
options:
- id: heal
name: "Heal"
- id: harm
name: "Harm"
- hr
@marcus-downing
marcus-downing / cleric.js
Last active May 27, 2018 23:15
Dyslexic Character Sheets - Pathfinder 2 Javascript - Sample 1
/*
CLERIC
Pathfinder 2 Playtest
*/
registerClass('cleric', 'Cleric', {
require: [
'subsystems/spells',
'subsystems/spell_points',
'feats/class/cleric/*',
@marcus-downing
marcus-downing / plugin-security-scanner.php
Last active August 29, 2015 14:23
Plugin Security Scanner
<?php
/**
* Plugin Name: Plugin Security Scanner
* Plugin URI: http://www.glenscott.co.uk/plugin-security-scanner/
* Description: This plugin determines whether any of your plugins have security vulnerabilities. It does this by looking up details in the WPScan Vulnerability Database.
* Version: 1.1.9
* Author: Glen Scott
* Author URI: http://www.glenscott.co.uk
* License: GPL2
#!/bin/sh
# Check HTTP cache
# Nagios test to check if a website has the correct cache control headers
ADDRESS="$1"
# Make two requests, capture the response headers on the second so we can see if it was delivered from the cache
curl -s "http://$ADDRESS/" -o /dev/null
HEADERS="$(curl -s -D - "http://$ADDRESS/" -o /dev/null)"
@marcus-downing
marcus-downing / replace_fonts.jsx
Created May 23, 2012 22:45
Replace fonts in all the Illustrator files in a folder
/*
Replace fonts in all the Illustrator files in a folder
Edit the array at the top to your own substitutions
Find the font names to replace using: https://gist.github.com/2778294
*/
// fonts to replace
var substitutions = [
['BellGothic BT', 'Bold', 'Roboto', 'Condensed'],
['BellGothic Blk BT', 'Black', 'Roboto', 'Bold Condensed'],
@marcus-downing
marcus-downing / list_used_fonts.jsx
Created May 23, 2012 22:43
List the fonts used in all the Illustrator files in a folder
/*
List the fonts
This shows you all the fonts used in all the Illustrator files in a folder,
even if the fonts aren't installed on your system.
You can then replace them with this script: https://gist.github.com/2778305
*/
function getAllFiles(folder) {
var fileList = [];
function recurse (folder) {