Skip to content

Instantly share code, notes, and snippets.

View fsmv's full-sized avatar

April Kallmeyer fsmv

View GitHub Profile
@fsmv
fsmv / a-instructions.md
Last active August 30, 2026 02:29
Custom steamos steam machine setup on a regular arch linux install
  1. Make a user account named steam, give it a home directory for games and probably don't put it in the sudoers file
    • Add it to the groups input video seat gamemode. seat is for seatd and gamemode will be installed later.
  2. Install and enable greetd as the login manager and set up the provided config in /etc/greetd/config.toml (this launches plasma which then autoruns gamescope steam)
    • This config sets it to auto login to the steam user with no password prompt and call the script which boots straight to steam (which can have lock screen optionally built in to steam)
  3. Install and enable gamescope seatd (two separate services to enable)
    • gamescope is a fast compositor steam uses in steamos mode (there are several aur packages with built in extras but I use the base package)
    • seatd is used by gamescope as a dependency to manage input device access 4
@fsmv
fsmv / update
Last active August 30, 2026 03:33
Update zfs-linux and zfs-utils and pull the correct version of the linux kernel from the arch linux archives
yay -Pnews
yay -Sy
$HOME/bin/update-linux
yay -Su --cleanmenu=true --answerclean=All --diffmenu=true --answerdiff=All --editmenu=false --answerupgrade=none
@fsmv
fsmv / autoupdate.sh
Last active February 14, 2026 17:01
Auto update and backup scripts for Vaultwarden without docker
# You probably want to change the killall and running ./vaultwarden &
# commands to run the service in this script. Most people prefer systemd.
# I run this with cron as the vaultwarden user so I get unix mail with the
# prints (e.g. if it crashed from broken dependencies or something).
#
# before you run this you need to:
#
# git clone https://github.com/dani-garcia/bw_web_builds
# git clone https://github.com/dani-garcia/vaultwarden vaultwarden.git
@fsmv
fsmv / Cap Filler.scad
Created August 6, 2024 01:10
A gel cap pill filler. Designed for splitting a size #00 pill into two size #2 pills. Should be adjustable to any pill size if you find the correct size for half the volume you started with.
// Copyright 2024 Andy Kallmeyer <ask@ask.systems>
// Model provided under the CC BY-SA 4.0 License
// https://creativecommons.org/licenses/by-sa/4.0/
//
// If you would like to re-use parts of this code instead of creating a
// variation of the whole model, I am providing the code snippets under the
// MIT License https://mit-license.org
//
// If you make a pill filler from this please use the CC BY-SA 4.0 License.
@fsmv
fsmv / proc_test_freebsd.c
Last active July 4, 2024 05:43
Test if PDEATHSIG is sent to child processes on thread exit in FreeBSD and Linux
#include <sys/procctl.h>
#include <stdio.h>
#include <err.h>
#include <unistd.h>
#include <stdlib.h>
#include <signal.h>
#include <pthread.h>
void child_handler(int signal) {
printf("Child got signal: %d\n", signal);
@fsmv
fsmv / pass.go
Last active June 21, 2025 22:45
A runnable go script that creates an http basic auth password hash compatible with .htaccess (this is just the password part, you have to add username:<hash>)
/*?sr/bin/env go run "$0" "$@"; exit $? #*/
// This is actually not a shebang, the first line is both valid shell script and valid go code
// Just run: chmod +x pass.go; ./pass.go
package main
import (
"bufio"
"crypto/sha256"
"encoding/base64"
"fmt"
@fsmv
fsmv / dont-use-communication-device.patch
Created May 24, 2018 02:37
In Windows, make Mumble use the Default Device not the DefaultCommunicationsDevice by default. Patch based on commit 2ad8c65165441c8250c7b5327e9cd1a858d833cc of https://github.com/mumble-voip/mumble
diff --git src/mumble/DirectSound.cpp src/mumble/DirectSound.cpp
index fb2b1d10..238fd853 100644
--- src/mumble/DirectSound.cpp
+++ src/mumble/DirectSound.cpp
@@ -115,7 +115,7 @@ static BOOL CALLBACK DSEnumProc(LPGUID lpGUID, const WCHAR* lpszDesc,
const QList<audioDevice> DXAudioOutputRegistrar::getDeviceChoices() {
QList<dsDevice> qlOutput;
- qlOutput << dsDevice(DXAudioOutput::tr("Default DirectSound Voice Output"), DSDEVID_DefaultVoicePlayback);
+ qlOutput << dsDevice(DXAudioOutput::tr("Default DirectSound Voice Output"), DSDEVID_DefaultPlayback);
@fsmv
fsmv / simple.vim
Last active June 25, 2023 04:36
A simpler .vimrc with better default settings for programming and with golang autoformatting and automatic listchars
" Optional plugin manager see: https://github.com/junegunn/vim-plug
" Do this first so we can overwrite anything it does after
"call plug#begin('~/.vim/plugged')
" Automatically source .local.vimrc files in directories you open
"Plug 'thinca/vim-localrc'
"call plug#end()
set title " Set terminal title
set mouse=a " Turn on mouse support
set undolevels=1000
@fsmv
fsmv / git_surgery.md
Last active April 14, 2023 19:17
How to merge multiple git repos into one repo, and preserve history

Merging multiple git repos into one

tl;dr:

  1. Import other repos as branches
  2. Move the files in the other repos into subdirectories for each project
  3. Rebase the other repo branches onto the master
  4. Merge everything into master in order

Note: placeholders are in angle brackets.

@fsmv
fsmv / vim.desktop
Created April 29, 2017 08:08
A vim desktop icon file for gnome. Put it in ~/.local/share/applications/ or /usr/share/applications/. It uses the gvim icon, if you don't have it installed then change the icon to gedit.
[Desktop Entry]
Name=vim
Comment=Edit text files
Exec=vim %U
Terminal=true
Type=Application
MimeType=text/plain;
Actions=new-window;new-document;
Keywords=Text;Editor;Plaintext;Write;
Icon=gvim