Skip to content

Instantly share code, notes, and snippets.

@jasonekratz
jasonekratz / how-to-setup-homebrew-python-with-pyenv.md
Last active May 25, 2023 21:04
Set up Homebrew-installed Python to be used by Pyenv

Did this while installing Azure CLI on my Mac.

At install time this had a dependency on Python 3.10 that I tried to resolve using the version 3.10.11 that was installed via Pyenv. Could not get this to work so uninstalled 3.10.11 via Pyenv, did a pyenv rehash, and then installed 3.10.11 directly via Homebrew: brew install [email protected]

I then set up Pyenv to be able to use this new version via a variation of the instructions found here. This required some changes though because the symlinks weren't right in the example given because I wanted the specific version of Python installed via Homebrew. If I wanted python3 in my PATH without needing Pyenv the install would have been brew install python3 which likely would have meant the symlink setup below would have been different.

This is what I had to do.

  1. cd ~/.pyenv/versions
  2. `ln -sfv "$(brew --prefix pyt
@jasonekratz
jasonekratz / time-machine-error-solution.md
Created February 15, 2025 02:05
Find errors causing Time Machine backup errors on Mac

Once in awhile I'll get an error when Time Machine is trying to run backups while my Mac is locked (problem goes away when it's not). Trying to find out why that happens has always been a bit of a pain but this command will help:

log show --predicate 'subsystem == "com.apple.TimeMachine"' --info | grep "Operation not permitted"

or more generally

log show --predicate 'subsystem == "com.apple.TimeMachine"' --info | grep error
@jasonekratz
jasonekratz / fix-unsigned-app-error.md
Last active February 15, 2025 02:30
Fix error launching unsigned apps on macOS Sequoia

Apple has been getting a bit carried away with limiting what users can run on their Macs. This is under the guise of security. This is due to the operating system setting a quarantine bit on downloads from random websites. When you launch the app it will report that there is a security problem with the download and will offer to let you move the application to the trash.

Don't do that. Do this:

xattr -d com.apple.quarantine <filename>

Example:

@jasonekratz
jasonekratz / gemini-byom.md
Created April 25, 2025 01:52
Configure Google Gemini in Brave as a BYOM for Leo AI