Skip to content

Instantly share code, notes, and snippets.

View popey's full-sized avatar
🏠
Working from home

Alan Pope popey

🏠
Working from home
View GitHub Profile
@popey
popey / rss2masto.py
Created October 23, 2023 10:18
rss2masto.py used for ubuntu weekly news bot
#!/usr/bin/env python3
# Name: rss2masto.py
# Author: Leon Cowle - https://github.com/leoncowle or https://hachyderm.io/@leoncowle on Mastodon
# Copyright: 2023 Leon Cowle
# License: MIT (see LICENSE file)
# Version: 0.1
import bs4
import feedparser
@popey
popey / build-snapd.sh
Created May 26, 2021 18:22
Build a patched snapd
#!/bin/bash
# Build snapd with longer time between forced refresh, effectively
# allowing systems to prevent any refreshes at all, "easily".
# While it's possible to defer updates to a later date, like this:
# $ sudo snap set system refresh.hold="$(/usr/bin/date --iso-8601=seconds -d '+30 days')"
# After 60 days, snapd will eventually force refresh, even if you run
# the above command every day to push the refresh time back continuously.
# All this script does is build snapd with a way longer interval between
@popey
popey / download_all_snaps.sh
Created April 30, 2021 14:48
Downloads every snap from the store (brutal, don't use often, store team will kill you)
#!/bin/bash
DATESTAMP=$(date +%Y-%m-%d)
TIMESTAMP=$(date +%H%M%S)
FOLDER="$PWD"/"$DATESTAMP"-"$TIMESTAMP"-download
if mkdir -p "$FOLDER" ; then
echo "Created $FOLDER"
else
echo "Failed creating $FOLDER"
exit 1
@popey
popey / snapcraft.yaml
Created January 25, 2021 17:44
BBCSDL Auto-starting snap for Raspberry Pi
name: bbcsdl
base: core20
version: "master"
summary: BBC BASIC for SDL 2.0
license: "Zlib"
description: |
BBC BASIC for SDL 2.0 is a cross-platform implementation of the BBC BASIC
programming language for Windows, Linux (x86), MacOS, Raspbian (Raspberry Pi),
Android, iOS and Emscripten / WebAssembly. It is highly compatible with BBC
BASIC for Windows and has the same language extensions, but uses SDL 2.0 as
[2021-01-16 20:55:36] Processing tool list from AppID 891390
[2021-01-16 20:55:36] Registering tool steamlinuxruntime_soldier, AppID 1391110
[2021-01-16 20:55:36] Registering tool steamlinuxruntime, AppID 1070560
[2021-01-16 20:55:36] Registering tool proton_experimental, AppID 1493710
[2021-01-16 20:55:36] Registering tool proton_513, AppID 1420170
[2021-01-16 20:55:36] Registering tool proton_5, AppID 1245040
[2021-01-16 20:55:36] Registering tool proton_411, AppID 1113280
[2021-01-16 20:55:36] Registering tool proton_42, AppID 1054830
pressure-vessel-wrap[10412]: Original argv:
pressure-vessel-wrap[10412]: 0: '/home/alan/.steam/debian-installation/steamapps/common/SteamLinuxRuntime_soldier/pressure-vessel/bin/pressure-vessel-wrap'
pressure-vessel-wrap[10412]: 1: '--env-if-host=PATH=/home/alan/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin'
pressure-vessel-wrap[10412]: 2: '--'
pressure-vessel-wrap[10412]: 3: 'steam-runtime-system-info'
pressure-vessel-wrap[10412]: 4: '--verbose'
pressure-vessel-wrap[10412]: Current working directory:
pressure-vessel-wrap[10412]: Physical: /home/alan/.steam/debian-installation/steamapps/common/SteamLinuxRuntime_soldier
pressure-vessel-wrap[10412]: Logical: /home/alan/.steam/debian-installation/steamapps/common/SteamLinuxRuntime_soldier
pressure-vessel-wrap[10412]: Environment variables:
alan@robot:~$ STEAM_LINUX_RUNTIME_LOG=1 steam
Running Steam on ubuntu 21.04 64-bit
STEAM_RUNTIME is enabled automatically
Pins up-to-date!
Steam client's requirements are satisfied
/home/alan/.steam/debian-installation/ubuntu12_32/steam -nominidumps -nobreakpad
[2021-01-16 23:11:51] Startup - updater built Dec 20 2020 23:07:02
Installing breakpad exception handler for appid(steam)/version(1608507519)
[2021-01-16 23:11:51] Loading cached metrics from disk (/home/alan/.steam/debian-installation/package/steam_client_metrics.bin)
[2021-01-16 23:11:51] Using the following download hosts for Public, Realm steamglobal
Computer Information:
Manufacturer: Unknown
Model: Unknown
Form Factor: Desktop
No Touch Input Detected
Processor Information:
CPU Vendor: GenuineIntel
CPU Brand: Intel(R) Core(TM) i7-8809G CPU @ 3.10GHz
CPU Family: 0x6
#!/bin/bash
# Check for updates to a bunch of snaps
DATESTAMP=$(date +%Y-%m-%d)
TIMESTAMP=$(date +%H%M%S)
LOGFILE=./reports/$DATESTAMP-$TIMESTAMP.txt
SNAPSFILE="./snaps.csv"
USERNAME="popey"
TMPDIR=$(mktemp -d)

Editing

After recording, each person drops their .flac file into a sub-directory called Dropbox/UbuntuPodcast/{S09E00}, where S09 is the season number, and E00 is the number of this episode.

  • Take a copy of the episode directory. Don't work inside the Dropbox directory because it annoys people when they get all your changes sync'd.
  • Use the ~/Dropbox/UbuntuPodcast/Audacity/audacity.sh script to launch audacity (it kills and re-enables pulseaudio for you)
  • Create a new project
  • Import all the FLAC files as seperate stereo tracks. They will be slightly different lengths and volumes, but should all start at the same point in time.

Mix down