Skip to content

Instantly share code, notes, and snippets.

View stupidpupil's full-sized avatar
💭
I may be slow to respond.

A Watkins stupidpupil

💭
I may be slow to respond.
View GitHub Profile
@stupidpupil
stupidpupil / GalliumOS on Edgar.markdown
Last active April 19, 2024 17:09
Guide to installing GalliumOS on an Acer Chromebook 14" (CB3-431) 'Edgar'

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

@stupidpupil
stupidpupil / bnf_name.peg
Last active August 8, 2018 19:33
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 / recolour.sh
Created December 22, 2018 11:37
Recolouring a film using ffmpeg and magick
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
class ZeteticCharacterVoice_ZetBastila extends XComCharacterVoice;
struct EventMap
{
var() Name EventName;
var() array<Name> FallbackNames;
var() array<Name> SoundCueNames;
};

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

@stupidpupil
stupidpupil / chickenpox.json
Last active July 10, 2019 22:40
From nhs.uk, 10th July 2019
{
"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"],
@stupidpupil
stupidpupil / mcrcon_wrapper.sh
Last active February 6, 2024 15:28
Yet Another Minecraft systemd service file, and accessories. (Gracefully handles shutdown properly, whilst still eventually SIGKILL-ing if that doesn't work.)
#!/bin/sh
server_properties_path=$(dirname "$0")"/../server/server.properties"
rcon_port=$(awk -F "=" '/rcon.port/ {print $2}' "$server_properties_path")
rcon_password=$(awk -F "=" '/rcon.password/ {print $2}' "$server_properties_path")
"$(dirname "$0")/mcrcon" -H 127.0.0.1 -P "$rcon_port" -p "$rcon_password" "$1"
@stupidpupil
stupidpupil / transit_times.md
Last active July 27, 2021 15:49
Transit times proposal

My plan is to generate a set of LSOA-to-LSOA matrices covering:

a. A drive-time matrix (this won't take account of variation incongestion or anything like that, so nominal departure/arrival time are largely irrelevant).

b. Travel-time matrices based on a small (3-5?) set of depart-after times.

c. Travel-plus-waiting-time matrices based on a small set (again 3-5?) of arrive-by times.

Example LSOAs

For the sake of easier explanation, I'm going to use the following LSOAs as examples:

@stupidpupil
stupidpupil / ExamplePIA.md
Last active September 12, 2021 12:35
Example PIA

Data has been collected from publicly available webpages that form part of the $WEBSITE. These pages contain timestamped posts made by $WEBSITE users, associated with their usernames.

Personal data

I recognise that individuals' posts constitute personal data. The individual that a post relates to is often likely to be identifiable in combination with registration data held by $WEBSITE, for example.

I note that I generally do not have the means to identify individuals from the information being processed. However, it is possible that some individuals will have chosen to post information that is readily identifiable.

Purpose of processing

The purposes of processing is to better understand the use of the $WEBSITE, the nature of its content over time, and how content is produced and engaged with by $WEBSITE users.

@stupidpupil
stupidpupil / walesish_r5r.R
Last active April 22, 2024 08:41
Get r5r running for Wales-ish
# Make sure that Java 21 is installed and available
# https://adoptium.net/?variant=openjdk21
# On a Mac, try `export JAVA_HOME=$(/usr/libexec/java_home -v 21)` before running R
library(tidyverse)
options(java.parameters = "-Xmx4G")
install.packages("r5r")
library(r5r)