Make a Markdown or org snippet from the flickr image in your browser (Raycast)

I don’t think I’ll use this a ton day-to-day because I haven’t put anything in flickr for a while, and generally use SmugMug these days for embedding stuff in a blog, but I’ve been learning how Raycast script actions work and this was an exercise in how to pass arguments in an action instead of going out to osascript dialogs. Visit a flickr image in Safari or Chrome Invoke the action from Raycast and: select a snippet format type in some alt text Get a snippet in Markdown, org, or HTML with your alt text, suitable for pasting into a blog post Why you want to do this: ...

May 8, 2025 · 3 min · 584 words · mike

Maybe it was the shell scripts we made along the way

The fundamental mania at work here is basically “wring all the motion out of a thing you can.” I wrote imgup because I hated what Microblog was doing to my photos, but also hated the whole shuffle of “upload an image to SmugMug, hand-write the markup to embed it in a post.” So it was an incremental improvement to build a web UI that stripped all the extraneous motion out of that workflow using the only thing I knew very well, which is Ruby/Sinatra. ...

May 8, 2025 · 3 min · 545 words · mike

imgup CLI improvement

I added a format option to the imgup CLI, so it’ll provide a snippet in either org, Markdown, or HTML markup now, matching what it can do from the web interface. Also realized I don’t have a “picture of the week” feature anymore, so I replaced that part of the menu with a direct link to the Smugmug target album in the Smugmug management UI. Great for quickly getting to a bunch of test photos and removing them. ...

May 7, 2025 · 2 min · 322 words · mike

In which I solve a food bank communications problem

I volunteered at the neighborhood food bank/pantry again today. Like last week I was put on what I guess is the “starch and carbs” station: One from a selection of a bag of flour, a bag of baking mix, or a bag of generic corn flakes cereal One or the other of a packet of spaghetti noodles or rice a can of pureed pumpkin I had more to keep track of this week, and there was something in the air. The first people to draw numbers for their place in the line got high ones: in the 90s and 100s. They didn’t want high numbers because the better items are long gone by the last 25 or so people, but the food bank folks don’t allow do-overs. Then a general mood hit and everybody started crowding for their number, a few people darted past the line control people and tried to get a second number, and it got a little rowdy. ...

May 7, 2025 · 3 min · 585 words · mike

Uploading to imgup from Photos

Woof. It involved some AppleScripting, shell scripting, and some ugliness due to RayCast not wanting to inherit my login shell environment (circumventing rbenv to run imgup), but I finally got it: Pick an image in photos Fire off the action in RayCast Select a snippet format of `org` or `markdown` Provide an alt tag Get a copy/pasteable snippet back from imgup I can drop into the blog I have a matching one for a selected file in the Finder. ...

May 7, 2025 · 1 min · 87 words · mike

imgup and org-mode (and lmno.org)

This morning I woke up wondering “what if I could do my lmno blogging from org-mode instead of Markdown?” Partly “why not” and partly “you get real org-capture and it becomes easier to shuttle text around.” That led to this: (defun lmno/org-export-blog () "Export ~/notes/blog.org → ~/notes/lmno.md." (interactive) (let* ((input-file (expand-file-name "~/notes/lmno.org")) (output-file (expand-file-name "~/notes/lmno.md"))) (with-temp-buffer (insert-file-contents input-file) (org-mode) ;; turn off all the bells that inject TOC, numbers, dates, etc. (let ((org-export-with-toc nil) (org-export-with-section-numbers nil) (org-export-with-author nil) (org-export-with-creator nil) (org-export-with-date nil) (org-export-with-priorities nil) (org-export-with-timestamps nil) (org-export-with-smart-quotes nil) (org-export-with-broken-links 'mark)) (org-export-to-buffer 'md "*lmno-export*" nil nil nil nil)) (with-current-buffer "*lmno-export*" ;; strip the anchors org's export insists on inserting (goto-char (point-min)) (while (re-search-forward "<a id=\"[^\"]+\"></a>" nil t) (replace-match "")) ;; strip the overhelpful datestamp spans (goto-char (point-min)) (while (re-search-forward "</?span[^>]*>" nil t) (replace-match ""))) ;; write out the clean Markdown (with-current-buffer "*lmno-export*" (write-region (point-min) (point-max) output-file))) (message "Clean export complete → %s" output-file))) It has to do two things I wish it didn’t: ...

May 6, 2025 · 2 min · 313 words · mike

git-auto-sync (and LaunchControl, and the Jurassic Park kid)

I don’t think it’s as magical as whatever nb is up to, but for wandering from machine to machine and not getting too out of control with it, git-auto-sync seems to do an okay job of periodically syncing up with a remote behind your back. When you target a directory with it, it creates a launchd agent, so the syncing daemon persists over reboots, etc. I got it from Homebrew, and discovered one issue with it, which is that the agent it sets up wants to log to /usr/local/var/log, which is locked down in at least recent versions of macOS (and ignores /opt/homebrew/var/log, which is already correctly permissioned, so now I’m wondering if I have the wherewithal to submit a patch somewhere). So you can either make that directory and set the right permissions, or twiddle the launch agent. ...

May 5, 2025 · 2 min · 341 words · mike

git-auto-sync, Raycast, and terminal-notifier

Raycast has a nice setup for making shell scripts into actions. I have one wrapper for emacsclient that just invokes a GUI Emacs window from a running Emacs server and then foregrounds the window: #!/bin/bash # Required parameters: # @raycast.schemaVersion 1 # @raycast.title Emacsd # @raycast.mode silent # Optional parameters: # @raycast.icon 🤖 # @raycast.packageName Emacs # Documentation: # @raycast.description Launch Emacs # @raycast.author pdxmph # @raycast.authorURL https://raycast.com/pdxmph /opt/homebrew/bin/emacsclient -c --no-wait osascript -e 'tell application "Emacs" to activate' … and I made another one that lets me trigger git-auto-sync operations when I’m going to step away for a while and want to make sure everything in my notes repo has been pushed: ...

May 5, 2025 · 2 min · 383 words · mike

Taking the X100VI to shows

I guess every music venue has rules for cameras and photography, and the nice thing about the X100VI is that it manages to avoid the “no interchangeable lens cameras” and “no lenses over 4 inches long” rules while also avoiding scrutiny as a “professional camera” because it’s small and vintage-looking. And it’s great for carrying along because it’s easy to cinch the strap up and have it close without a lot of bulk or weight. ...

May 4, 2025 · 3 min · 616 words · mike

emacs-plus

I switched my Homebrew Emacs package to emacs-plus@30 this past week. I am sure there are nuances that are escaping me, but I was mostly after something with a tested launchd service I could manage from brew services, and I thought the built-in support for system appearance changes seemed pretty cool, since it let me retire 20 lines of elisp that wasn’t nearly as effective as this build is at detecting when Dark Mode is on or off. ...

May 3, 2025 · 2 min · 246 words · mike