This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//////////////////////////////////////////////////////////////////////////////// | |
/// | |
/// Beats-per-minute (BPM) detection routine. | |
/// | |
/// The beat detection algorithm works as follows: | |
/// - Use function 'inputSamples' to input a chunks of samples to the class for | |
/// analysis. It's a good idea to enter a large sound file or stream in smallish | |
/// chunks of around few kilosamples in order not to extinguish too much RAM memory. | |
/// - Inputted sound data is decimated to approx 500 Hz to reduce calculation burden, | |
/// which is basically ok as low (bass) frequencies mostly determine the beat rate. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# ^^^ YAML documents must begin with the document separator "---" | |
# | |
#### Example docblock, I like to put a descriptive comment at the top of my | |
#### playbooks. | |
# | |
# Overview: Playbook to bootstrap a new host for configuration management. | |
# Applies to: production | |
# Description: | |
# Ensures that a host is configured for management with Ansible. |
I hereby claim:
- I am naggie on github.
- I am naggie (https://keybase.io/naggie) on keybase.
- I have a public key ASB9uGHAMZgoCraaRl0O0-rYI5Q3Yzkbnv1k2G_v0l8Bkwo
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
VERSION=3.7.12 | |
NAME=Python-${VERSION} | |
TGZ_FILE=${NAME}.tgz | |
sudo apt update | |
sudo apt -y install \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
VERSION=3.9.5 | |
NAME=Python-${VERSION} | |
TGZ_FILE=${NAME}.tgz | |
sudo apt update | |
sudo apt -y install \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> {}, fetchurl } : pkgs.stdenv.mkDerivation { | |
#/data/shared/software/games/PC/custom_distribution/doom3/RBDOOM-3-BFG-1.3.0.42-full-win64-20211030-git-b4e0366.7z | |
# TODO precalc full as above? | |
# TODO mod_ultimateHD wrapper? (see .bat) | |
# TODO autoexec.cfg settings? | |
# TODO desktop file + icon | |
name = "doom3"; | |
src = ./.; |
Instructions:
- Remove everything but the SATA drive on the ODD port (this includes the SD, remove it too)
- Boot from USB to install ubuntu server or (whatever) to the SATA drive (It will detect no UEFI and install to MBR)
- Boot a live session from USB and run fdisk -l /dev/sda assuming that's your install HDD -- record the "Disk identifier," a hex number
- Insert the microSD into a USB reader (not the built in reader as that has to be active at boot)
- Check the device name with lsblkEdit syslinux.cfg to put your Device identifier in place of mine
- Run ./create-sd.sh /dev/sdb assuming sdb is the microSD
- Shutdown and transfer the SD card over to the internal reader.
- Remove the USB reader and connect everything
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
# pactl list short sinks | |
# pactl list short sources | |
# | |
# pactl get-default-sink | |
# pactl get-default-source | |
# annoyingly the source for the mic can change ID, so we have to pattern match to be safe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# blink1 is now supported in the kernel with a sysfs interface. | |
# blink1tool is therefore not neccessary, which is good because it causes | |
# the device to re-enumerate every few seconds which spams dmesg and can cause the | |
# usb controller to lock up! | |
# | |
# Sets 2 colours for a nice gradient | |
{ config, pkgs, ... }: | |
{ | |
systemd.services.blink1status = { | |
path = [ |