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 / snapcraft.yaml
Created April 3, 2019 20:17
Template snapcraft.yaml for Unity3D games.
name: unitygame
version: "1.0"
summary: Unity Game
description: |
A simple game made in Unity.
base: core18
confinement: strict
parts:
unity-game:
#!/bin/bash
# Automatically setup routing and DNS for a PiZero connected over a USB-network
# Based off https://gist.github.com/lurch/ad939bbce48064cffdb215268eac9f62
# Need to have booted PI Zero with config.txt option "dtoverlay=dwc2"
# and cmdline.txt parameter "modules-load=dwc2,g_ether"
# TODO
# Force PI to have fixed MAC address like e6:45:88:d0:85:46
# For now, edit cmdline.txt in the boot partition on the pi SD card, add:-
# g_ether.dev_addr=e6:45:88:d0:85:46

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

@popey
popey / snapcraft.yaml
Created April 3, 2019 20:17
Template snapcraft.yaml for Godot Engine games
name: godot-game
base: core18
version: '1.0'
summary: Godot Game
description: |
A simple game made in Godot
grade: stable
confinement: strict
@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
@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
#!/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)
@popey
popey / UbuntuPostInstall.md
Last active March 27, 2021 09:20
Steps done Post-Install