Skip to content

Instantly share code, notes, and snippets.

View mwt's full-sized avatar

Matthew W. Thomas mwt

View GitHub Profile
@mwt
mwt / README.md
Last active May 3, 2023 00:36 — forked from r0l1/README.md
Running docker-compose as a systemd service

Running snikket as a systemd service

Files

File Purpose
/etc/snikket/docker-compose.yml Compose file describing what to deploy
/etc/systemd/system/snikket.service Service unit to start and manage docker compose
/etc/systemd/system/snikket-reload.service Executing unit to trigger reload on docker-compose.service
/etc/systemd/system/snikket-reload.timer Timer unit to plan the reloads
@mwt
mwt / gist:2b35ae84f3d4d9a859481b03f2daee9b
Last active July 27, 2022 00:08 — forked from unixabg/gist:4ca86477b6ad0504d8b9486f1a160057
alsa helper script for the glkda7219max
#!/bin/bash
echo Adding microphone to Pulseaudio
grep -qxF 'load-module module-alsa-source device=hw:0,99' /etc/pulse/default.pa || echo 'load-module module-alsa-source device=hw:0,99' >> /etc/pulse/default.pa
echo Adding headphone to Pulseaudio
grep -qxF 'load-module module-alsa-sink device=hw:0,1' /etc/pulse/default.pa || echo 'load-module module-alsa-sink device=hw:0,1' >> /etc/pulse/default.pa
echo Adding headset microphone to Pulseaudio
@mwt
mwt / handler_fieldstorage.py
Created January 25, 2021 21:01 — forked from davidejones/handler_fieldstorage.py
aws lambda parsing multipart form with python3
from cgi import FieldStorage
from io import BytesIO
def parse_into_field_storage(fp, ctype, clength):
fs = FieldStorage(
fp=fp,
environ={'REQUEST_METHOD': 'POST'},
headers={
'content-type': ctype,