Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / weblog-dot-lol-notes.md
Created January 31, 2023 18:14
weblog.lol Notes

Notes on the weblog.lol posts feature:

  • "Slug:" in the post front matter will not be sluggified. Would be nice to have that happen automatically no matter what is put in there.

Would love for this system to kind of mirror Blot.im in how you can determine the dates of posts, either via front matter or by the folder structure/filename.


Front matter options

@jasonekratz
jasonekratz / README.md
Last active September 30, 2022 21:26
Debugging Fastify Applications with Panic's Nova on Mac and Fastify CLI

Debugging Fastify Applications with Panic's Nova on Mac and Fastify CLI

The documentation for Panic's Nova 9 for debugging Node (or in general) is atrocious so I'll share how I was able to debug a local node/Fastify application using Fastify CLI. It's actually pretty simple.

Note: This obviously requires having installed Fastify CLI. In my screenshot I am using a copy of Fastify CLI that is local to my application folder, not a global install. If you're using a global Fastify CLI install the path is likely different to the cli.js. For instance with Homebrew on the Mac the path would be likely be /opt/homebrew/lib/node_modules/fastify-cli/cli.js.

Note: The folder to your "app.js" might be different. I'm writing my app in TypeScript so it's being compiled to JavaScript in the dist folder.

Here is a screenshot of my setup:

@jasonekratz
jasonekratz / sh-pipeline-win10.md
Last active September 15, 2022 11:09
Run Jenkins pipeline build using 'sh' step on 64-bit Windows 10

Run Jenkins pipeline build using 'sh' step on 64-bit Windows 10

Test script

pipeline {
    agent any

    stages {
 stage('Hello') {
@jasonekratz
jasonekratz / Drafts-Sync-Tags.js
Last active June 26, 2020 00:06
Action for Drafts App, https://getdrafts.com , to update the applied tags to match a line of hashtags on the last line of the draft. Also in the Drafts Directory here https://actions.getdrafts.com/a/10l
let lastLine = draft.lines[draft.lines.length- 1];
if(lastLine.startsWith('#')) {
let re = /#([\w]+)/g;
let hashtags = [...lastLine.matchAll(re)];
let newtags = []
// because matchAll is returning both the full hashtag and the text just get the text
on alfred_script(q)
tell application "iTerm" to activate
tell application "iTerm"
tell first session of current tab of current window
write text q
end tell
end tell
end alfred_script
@jasonekratz
jasonekratz / showuntagged.md
Last active December 2, 2019 00:15
DEVONthink 3 - show untagged items

Create a new Smart Group with the following rules:

  1. All of the following are true
    1. Kind is Any Document
    2. Item is not Tagged
  1. git lfs install
  2. clone repo
  3. checkout branch(es) that you want to migrate
  4. remove remotes
    • git remote remove <remote name>
  5. git lfs migrate import --include="*.uasset","*.umap","*.lib" --everything
    • --include has example file types.
    • --everything will do all branches
  6. create new remote repo
  7. add remote(s) back in git remote add origin for new repo created above