Skip to content

Instantly share code, notes, and snippets.

@v1ne
v1ne / .config\systemd\user\librespot-purgecache.service
Created May 2, 2020 12:29
Librespot on Raspberry Pi 3 with HiFiBerry Digi(+) without clicks
[Unit]
Description=do librespot's job
[Service]
ExecStart=%h/bin/prune-cache /mnt/cache/%u/spotifyd 2.6G
[Install]
WantedBy=librespot.service
@v1ne
v1ne / prune-cache.d
Created April 27, 2020 19:59
Shrink a cache directory to a given size
#!/usr/bin/env rdmd
/*
* BSD 2-Clause License
*
* Copyright (c) 2020, v1ne <v1ne2go@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
@v1ne
v1ne / solve-freebsd-update-rcs-conflicts.d
Created June 11, 2018 21:41
Solve RCS ID conflicts automatically from inside freebsd-update
#!/usr/bin/env rdmd
/*
* Ever ran into a problem with freebsd-update because you migrated a
* manually-built FreeBSD to freebsd-update because of RCS ID mismatches?
* This tiny D program solves those pseudo conflicts manually for you.
*
* Usage: REALEDITOR="$EDITOR" EDITOR=<this> freebsd-update upgrade ...
*
* (C) 2018 v1ne <v1ne2go-github-fbsd@gmail.com>
*/