Skip to content

Instantly share code, notes, and snippets.

View Sidelobe's full-sized avatar

Lorenz Bucher Sidelobe

View GitHub Profile
@Sidelobe
Sidelobe / notarization.md
Last active December 18, 2025 08:34
Notarization of a macos App Created With PyInstaller

Why

This gist contains my personal notes and gotchas identified while trying to create an .app out of a Python script and distribute it directly (outside App Store) via a .dmg. This subject has been the source of a lot of confusion and frustration throughout the years. Since altool was retired and replaced by notarytool things have improved in terms of documentation IMHO, but at the same time the 'screws are tightened' by Apple's Gatekeeper in incresingly short intervals. While I welcome added security as a whole, us developers need to jump through quite a few more hoops. It's almost as if they want to encourage you to distribute via the App Store...

Code Signing

All executable (incl. libaries) needs to be signed. pyinstaller does this with the codesign_identity specified (via command line option or in .spec file) and recursively to all dependencies bundled, including the Python executable.

Signing the .dmg

The .dmg needs to be code-signed, too: `codesign --sign ${team_id} "${app_name}.dmg

@Sidelobe
Sidelobe / gist:1deeb38663dd962ec69d20a8a6f0bec3
Last active September 28, 2025 16:56
Weird fonts in Meld for macos (installed through brew)

If your Meld looks like this (font kerning messed up) image

In /Applications/Meld.app/Contents/Resources/share/themes/Mac/gtk-3.0/gtk-keys.css

Search for this snippet and replace SF Pro with e.g. Helvetica:

label,popover,window {
 font-family: "SF Pro";
@Sidelobe
Sidelobe / Video Wall for Art Installation.md
Last active October 28, 2024 20:23
Preparing a video art installation in 32:9 format on 2 projectors

A Video Wall for an Art Installation

A video artist approached me with the following problem: she wanted to play back a recorded performance art piece in "double-wide" format, i.e. two 16:9 videos next to each other.

The video was recorded with a 4k camera (3840x2160 resolution) and then edited and cropped to produce a 4k video file, in which only the "middle vertical slice" contains information (letterbox). After discussing several options, such as using a single 4k projector with a cropped image, we settled on using two FullHD projectors next to each other. Financial considerations played a significant role as well.

Playing back a 32:9 format video on 2 projectors was deemed as too fickle / difficult without using specialized hardware (video wall controllers) or software (e.g. Multi-View HD Pro 2. 2 older mac minis that were lying around seemd good candidates for the job.

The tasks at hand were roughly the following:

  1. [Cropping Videos with FFMPE
@Sidelobe
Sidelobe / duplicate_line_xcode.md
Last active August 21, 2025 16:00 — forked from emotality/duplicate_line_xcode.md
Xcode - Duplicate Line key binding

Xcode line duplication (without overwriting your clipboard)

I find this shortcut extremely useful in Xcode: duplicate one or several lines without losing what you have on the clipboard.

UPDATE: it seems Xcode finally added this feature as of version 14: one can now select text and use the usual duplicate shortcut (Cmd-D)

Bind keys to duplicate lines in Xcode

  1. To add custom key bindings in Xcode, you have to edit this file (su privileges required): '/Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/Current/Resources/IDETextKeyBindingSet.plist