Skip to content

Instantly share code, notes, and snippets.

💭
I may be slow to respond.

Adam Watkins stupidpupil

💭
I may be slow to respond.
Block or report user

Report or block stupidpupil

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
@stupidpupil
stupidpupil / chickenpox.json
Last active Jul 10, 2019
From nhs.uk, 10th July 2019
View chickenpox.json
{
"description": "Find out all you need know about chickenpox, including what the symptoms are, how to treat it and when to get medical advice.",
"author": {
"logo": "https://www.nhs.uk/nhscwebservices/documents/logo1.jpg",
"email": "nhswebsite.servicedesk@nhs.net",
"url": "https://www.nhs.uk",
"name": "NHS website",
"@type": "Organization"
},
"lastReviewed": ["2017-05-26T00:00:00+00:00", "2020-05-26T00:00:00+00:00"],
View CoH2 to XCOM2.md

I note that I've done most of my actual file and audio processing under either macOS or Linux, where I'm much more familiar with the scripting tools. I might not be able to help you as much I'd like.

General advice for trying to make a voice pack

I'd suggest taking a look at my voicepack template or at least Kregano's tutorial that it's based off.

Why? Well, Kregano's tutorial covers using a script (by robojumper) that fixes several problems with the built-in approach to voice 'banks', and my template then tries to help you avoid having to decide what to name bits of code and stuff.

If you do try my template, I suggest calling your project and your mod something like 'SlickSlothGrenadierVoice' or something (without spaces, and the same name for the project and mod) otherwise it ends up even more confusing in places...

Getting CoH2 sound files into XCOM 2

View ZeteticCharacterVoice_ZetBastila.uc
class ZeteticCharacterVoice_ZetBastila extends XComCharacterVoice;
struct EventMap
{
var() Name EventName;
var() array<Name> FallbackNames;
var() array<Name> SoundCueNames;
};
@stupidpupil
stupidpupil / recolour.sh
Created Dec 22, 2018
Recolouring a film using ffmpeg and magick
View recolour.sh
ffmpeg -i original.mp4 "original_frames/$filename%04d.png"
for infile in original_frames/*.png; do
convert "$infile" -color-matrix '0.6 -0.2 0.1 -0.4 0.4 0.4 -0.4 0.5 0.4' -modulate 180% "new_frames/$(basename "$infile")"
done
ffmpeg -y -i new_frames/%04d.png -r 25 -pix_fmt yuv420p out.mp4
View bnf_name.peg
bnf_name <-
("Gppe " form "_" product_name_word (" "* (ratio / quantity / modifier / product_name_word))*) /
((product_name_word " "?)+ "_" (" "* (!form product_name_word))* " "* form (" "* (ratio / quantity / modifier))*)
;
product_name_word <- r'[^\s_]+' ;
ratio <- (quantity / number) ("/" / ";") (ratio / quantity / unit / number);
@stupidpupil
stupidpupil / GalliumOS on Edgar.markdown
Last active May 11, 2019
Guide to installing GalliumOS on an Acer Chromebook 14" (CB3-431) 'Edgar'
View GalliumOS on Edgar.markdown

GalliumOS on Edgar

This document sets out how I installed GalliumOS 2.1 on a new Acer Chromebook 14" (CB3-431) 'Edgar' in April 2017. I installed GalliumOS on the internal eMMC storage, but left Chrome OS in place (allowing dual-booting).

It is meant to be an easy-to-follow and particularly thorough (if repetitive) guide, but I make no warranty that it will work correctly for you. It will wipe all data on your Edgar.

I have tried to provide references for each section; see the GalliumOS wiki guide to chrx installation for an overview of the general process.

⚠ Caution: There have been reports of Edgars' speakers overheating, due to a malfunction of the audio hardware, when booted into anything other than Chrome OS. I have not experienced this, and it seems to be believed that this will not now occur under GalliumOS. More information can be found in the comments for the [GalliumOS Braswell Platform Validation

View plotIsOnAnIsland.lua
function plotIsOnAnIsland(pPlot)
local canGoOnLand
canGoOnLand = function (pStartingPlot, iDirection, iDistance, iDirectionConstraint)
if iDirectionConstraint == nil then
iDirectionConstraint = iDirection
end
local directionMeetsConstraint = function(dir)
@stupidpupil
stupidpupil / usr.sbin.hostapd
Last active Sep 12, 2017
hostapd Debian AppArmor profile
View usr.sbin.hostapd
#include <tunables/global>
/usr/sbin/hostapd {
#include <abstractions/base>
#include <abstractions/nameservice>
capability net_admin,
capability net_raw,
network packet,
network raw,
@stupidpupil
stupidpupil / alfa.rb
Created Jan 10, 2017
A script for spelling out strings using macOS's `say` command
View alfa.rb
#!/usr/bin/env ruby
# A script for spelling out strings using macOS's `say` command.
# Uses the NATO/ICAO spelling alphabet, mostly.
# Mapped to spellings that produce the desired effect, specifically with the Fiona voice.
# Didn't use phonemes as these are not reliably available for recent (Nuance) voices.
# TODO: Use ICU to get Unicode character names
mapping = {
'a' => 'alfa',
@stupidpupil
stupidpupil / pre-commit.sh
Last active Sep 1, 2016
Beancount git pre-commit hook
View pre-commit.sh
#!/bin/sh
git stash --quiet --keep-index --include-untracked
bean_check_err=`bean-check main.beancount 2>&1 >/dev/null`
git stash pop --quiet --index
error_lines=`printf "$bean_check_err" | wc -l | awk {'print $1'}`
if [ $error_lines -eq 0 ]; then
echo "\\033[32mBean-check passed! 💰\\033[0;39m"
You can’t perform that action at this time.