Skip to content

Instantly share code, notes, and snippets.


Simple Parametrized Snap-fit Enclosure for a PCB in Onshape

One killer application for 3D printing is building enclosures for electronics prototypes. Many hobbyists use tools like TinkerCAD to build simple project boxes that are held together using screws.

A more elegant solution is to use snapfit enclosures that consist of two parts that can be snapped together with a satisfying click and without the need for additional parts or tools. Depending on how these snap-fits are designed, pulling the parts apart can be very easy to next to impossible.

Key principles

  • The part must not be under stress after being snapped together. PLA slowly deforms over time if it is under pressure for a prolonged period of time. Hence avoid "friction fits" where to parts are joined simply due to the friction betwee them
  • Always use clearance, at least in x and y dimensions. 0.1mm for a well-tuned FDM printer to 0.2mm for larger nozzles and/or faster printing situations
probonopd /
Last active Apr 5, 2021
SheepShaver on FreeBSD, it can be done!

SheepShaver on FreeBSD

Set e.g., 800x600 with 60fps or fullscreen and it works!


sudo sysctl security.bsd.map_at_zero=1
probonopd /
Last active Apr 11, 2021
Boycott Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

tl;dr: Wayland is not ready as a 1:1 compatible Xorg replacement just yet, and maybe never will. Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better of not using Wayland at this point.

Wayland solves no issues I have but breaks almost everything I need. And usually it stays broken, because the Wayland folks only seem to care about Gnome, and alienating everyone else in the process. DO NOT INSTALL WAYLAND! Let Wayland not destroy everything and then have other people fix the damage it caused. Or force more Red Hat/Gnome components (glib, Portals, Pipewire) on everyone!

Please add more examples to the list.

Wayland breaks screen recording applications

probonopd / dejavu.txt
Last active Sep 19, 2020
How to remove these fonts without removing KDE? Create dummy packages with the same name?
View dejavu.txt
$ sudo pkg remove dejavu
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 162 packages (of 0 packages in the universe):
Installed packages to be REMOVED:
accounts-qml-module: 0.7
adwaita-icon-theme: 3.28.0
akonadi: 20.04.2
baloo-widgets: 20.04.2

Fontconfig, Chrome, and URW fonts were driving me insane

tl;dr: Many versions of the URW fonts coming with Linux distributions and, in my case, FreeBSD, seem to be broken. Uninstall them and use those from instead. It does wonders!

I can't stand "metric compatible" surrogate fonts like DejaVu, Liberation, Bitstream Vera. I would much rather have fonts that at least optically largely match "original" fonts, such as URW Nimbus Sans L (which is a rebranded Helvetica). Yet most open source desktops come with "metric compatible" surrogate fonts deeply pre-wired: When you try to uninstall them using the package manager, then due to the way the package dependencies work the whole graphical desktop gets uninstalled. When you let the packages installed but delete the font files, other breakage occurs. So Fontconfig to the rescue... not.

Example (scoll all the way down for a working one)

I am trying to replace certain sans serif fonts with _Nimbus Sans L

probonopd /
Created Aug 29, 2020
FreeBSD launcher for OBS Studio so that one can record sound from the microphone
# See
# for more information
set -x
MIXER=$(cat /dev/sndstat | grep "rec" | cut -d ":" -f 1 | tail -n 1 | sed -e 's|pcm|mixer|g')
mixer -f /dev/$MIXER mic 100

Solve all USB permissions errors

Sometimes I get "permissions denied" errors for USB devices.

Example: avrdude in Arduino.

This is the brute force method to allow all users on a Linux system to use all USB devices:

sudo chmod 666 /dev/bus/usb/*/*

Get Normal "Save" dialog in Microsoft Office 365

This trick is golden. It makes the non-standard Office "Save" dialogs go away. I post it here because this drove me crazy until I found the solution.

Click File > Options > Save, and then check the "Don’t show the Backstage when opening or saving files" box.

Apparently these horrific dialogs are called "Backstage" by Microsoft. I will never understand why anyone would want to see them. They are entirely unintuitive and just cumbersome. They do not fit the rest of the Windows UX, and you never seem to be able to navigate the filesystem. They are so complicated and annoying that I don't understand them to this day. Even worse than Clippy and the Ribbon.

What is this horrific "Backstage View" supposed to be good for, except being inconistent and annoying people?