-
Wonder how many of us, faced with toll roads which now:
- photograph the car & license plate
- add a “convenience” fee
- via some unknown 3rd party with our private info…
instead: - simply choose to save our privacy and a bit of $
- by spending a few more minutes
- on a more pleasant road
-
not-so-temporary files
hmm; I recently had the need to find where the “temporary” PDF was stored, as a result of selecting “Print > PDF > Open in Preview”, in an app - and found that it’s no longer simply in your user’s
$TMPDIR
- so:here’s a command-line to find recent ones and move them to the Trash, to review (and likely delete):
find $TMPDIR ~/Library/Containers/*/Data/tmp/TemporaryItems -type f -mtime -7 -iname \*.pdf\* -print0 | xargs -0 -r -L1 -t -I% mv -i % ~/.Trash/; open ~/.Trash/
(note: there may be several of the same name, and these will not overwrite each other, and thus not be moved - after disposing of previous results (as per your needs), run the command again. lather, rinse, repeat.)
—it appears these dirs are not cleaned up on a schedule (though may be cleared via
Safe Mode
), so files may linger here for quite some time - including, depending on what you “Print to PDF”, some that you may not want hanging around (ex: bank statement).
—BTW: depending what apps you use, you may want to check what else is in these
TemporaryItems
dirs:find $TMPDIR ~/Library/Containers/*/Data/tmp/TemporaryItems -type f \! -name .DS_Store -ls
(as usual: caveat lector)
-
Q&D cmd-line to show dependency graphs for `brew outdated`
``` brew outdated -q | while read searchRoot; do echo 'checking for '$searchRoot'...' searchIterations=10 outFile=/tmp/$(date +%Y%m%d-%H%M%S)_brew_${searchRoot}.gv fullGraph=$(brew deps --installed --dot --graph --include-requirements --for-each --annotate) nodeList="$searchRoot" for i in $(seq 1 $searchIterations); do nodeListNew='' newNodes=$(echo "$fullGraph" | egrep " -> \"($nodeList)" | cut -d\" -f2,4 -s | tr '"' '\n' | sort | uniq | tr '\n' "|" | sed 's/|$//') if [ -n "$newNodes" ] then nodeListNew=$(echo "$nodeList"$'\n'"$newNodes" | tr '|' '\n' | egrep -v '^$' | sort | uniq | tr '\n' "|" | sed 's/|$//') else break fi if [ "$nodeListNew" = "$nodeList" ] then break fi nodeList=$nodeListNew done potOut=$(echo "$fullGraph" | egrep "$nodeList" | sort | uniq) echo 'digraph {'"$potOut"'}' > "$outFile" dot -O -Tpdf "$outFile" open "$outFile".pdf done ```
Code tested on macOS 14.4, with the following extras:
brew
,graphviz
(containingdot
) -
mac file sharing settings cleared
seems to have happened just after applying the 14.3.1 update (though has happened before):
all settings missing from the GUI, andsharing -l
shows the same - nothing. 😕easy enough to re-config - at least after I determined this was the problem, and scratched my head to remember what shares were defined.
(might want to cronsharing -l
, to keep a log of the config) -
Interesting underscore artifact in recent versions of macOS Terminal
a thin horizontal line, somewhere before the current cursor…
it’s apparently a leftover bit of the cursor which (regardless what style cursor you have) displays in the underline format, where a cursor was.
selecting that line (ex: triple-click) clears the artifact. -
A refreshingly nuanced look at "AI"
John Siracusa (famed of exacting investigation and insight) has some excellent ideas - and questions - about “Generative AI”. Which we’re now awash in, whether we know it or not: I Made This.
My own, entirely separate, opinion:
There is no AI that exists right now; “Generative AI” is a (marketing) label, for systems created on the backs of people, while giving them no credit - and certainly none of the revenue. Calling it “AI” is - at best - a stretch. And it’s the latest twist (of the blade) in the “gig economy”.
-
Ian McDonald’s “The Little Goddess” is beautiful, brilliant - a page-turner! From The Very Best of the Best. Apparently, a novella from River of Gods - my next stop!
-
for each Time Machine destination, display: ID, date & human-readable destination
{ remvHeaders='s/==+/\'$'\n''/g'; echo 'Current status of TM destinations:'; destInfo=$(tmutil destinationinfo | \ sed 's/^> //' | \ tr '\n' '\;' | \ sed -E 's/ +:/:/g' | \ sed -E "$remvHeaders"); defaults read /Library/Preferences/com.apple.TimeMachine.plist Destinations | \ egrep -v ',$' | \ sed -E -e ':a' -e 'N' -e '$!ba' -e 's/\n[[:blank:]]+"/ /g' | \ sed -E 's/^[[:blank:]]+//' | \ fgrep -e DestinationID -e SnapshotDates | \ sed -e ':a' -e 'N' -e '$!ba' -e 's/;\n/;/g' | \ sed 's/( /"/' | \ while read -r theLine; do destID=$(echo "$theLine" | \ cut -d\" -f2); snapDate=$(echo "$theLine" | \ cut -d\" -f4); echo $destID $snapDate$(echo "$destInfo" | \ fgrep "$destID" | \ sed 's/;ID.*$//' | \ sed -E -e 's/;[^: ]+: / /g'); done | sort -rn }
-
wow; I just read my first work by Eleanor Arnason - “Potter of Bones” (in “The Very Best of the Best” anthology) is smart, enchanting, fresh, and I’m looking forward to more!
refs: -
open
iftop
for each (cfg’d) network interface:for i in $(ifconfig -lu); do if ifconfig $i | fgrep -v 'inet 127.' | grep -q "inet [0-9]"; then echo $i; fi; done | while read intfc; do osascript -e "tell application \"terminal\" to do script \"sudo iftop -i $intfc\""; done
(Mac; could be adapted)
-
Partially-formed process, to convert RTF formatting (ex: lists) from clipboard / pasteboard, to paste into Markdown format (ex: git):
osascript -e 'the clipboard as «class RTF »' | tr -d '«»' | sed 's/^data RTF //' | xxd -r -p | /usr/local/bin/pandoc -f rtf -t markdown
(for Mac; could be adapted)
-
strange: when adding a link to an (Apple) Notes document: if the URL has a comma, everything up to the comma is silently stripped (permanently; editing the URL afterward, is too late) - one solution is to encode commas (the first time) as
%2C
-
$14 / month - and you better believe you’re still the product 🤮
arstechnica.com/tech-poli… -
got my first pension check; nice. retiring, is the best (work-related) decision I ever made - LOVING it.
(BTW: kudos to Cox Auto, for continuing to offer a pension.) -
reminder:
that thing you opened you phone/computer for - to be immediately distracted by other notifications? do the first thing FIRST - those notifications will still be there.
(otherwise, you’ll likely forget the first - likely more important - thing.) -
Uninstall is sometimes not so simple
Drat; I’ve been meaning to try the Smile AppleScript editor, but waited too long, and it’s incompatible with modern macOS - HOWEVER:
I trashed the
/Applications/Smile
directory (no uninstaller in there), and then re-opened Script Editor to get back to work - but it hung; never completed startup and showed no error messages. Strange.After a bit of debugging, I recalled that when I’d installed Smile - since I luckily already had Apple’s built-in Script Editor app open - the Installer told me it had to quit that first. Interesting - and seemed maybe relevant now.
So I started hunting for evidence of just what had been installed - likely something conflicting with Script Editor (at least).
/var/log/install.log
did have some info, and so did/private/var/db/receipts
- which led to the solution (in my case anyway), which was also deleting these directories:/Library/Application Support/Smile /Library/ScriptingAdditions/FITS.osax /Library/ScriptingAdditions/Numerics.osax /Library/ScriptingAdditions/Satimage.osax /Library/ScriptingAdditions/XMLLib.osax
After which, Script Editor was able to finish startup - and even showed the unsaved script that I’d been working on. Nice.
-
ugh: in a dir within
iCloud Drive
, replacing a regular file, with a symlink of the same name, apparently breaks sync’ing 😟 - and good luck trying to find that viabrctl log -w
. (only reason I knew it broke: a periodic check of sync status) -
oh; weird: if you happen to have
/tmp
open in a Finder window,brew install wget
fails withdir_s_rmdir
- apparently due to a “.DS_Store” file, a few levels below/tmp
-
Google - the company whose motto WAS “Don’t be Evil”: arstechnica.com
-
Apple Savings: % ain’t bad & it looks like xfer between a linked external account, is much more pleasant (fee-free) than with most others: www.apple.com/newsroom/…
-
are you in the cloud majority? twitter.com/Grady_Boo…
-
macOS Login Items, and other "Allow in Background"
There are lots of Login Items and other “Allow in Background” items in macOS these days (especially if the Mac is managed…) so it can be useful to get a list of them all - especially when names shown in the GUI, are not clear. The
dumpbtm
tool is verbose - though generally all you need is this abbreviated list:sfltool dumpbtm | grep -E '^([[:blank:]]{0,1}[^[:blank:]]|[[:blank:]]*(Name|URL):)'
-
how to convert macOS clipboard RTF (ex: from Notes.app), to Markdown? this’ll get you 95% of the way there:
osascript -e 'the clipboard as «class RTF »' | tr -d '«»' | sed 's/^data RTF //' | xxd -r -p | /usr/local/bin/pandoc -f rtf -t markdown
-
the new legit slacking excuse - and not just for programmers!
with thanks / apologies to the amazing Randall Munroe - his original: xkcd.com/303
-
How strange: On one Mac I use, when I paste (cmd-V) into the filename field (has focus) in a Save dialog, it suddenly jumps to the Documents folder. On another Mac, it simply pastes, leaving the folder as-is. It apparently does this jump, on any keyboard equivalent (ex: cmd-A).
subscribe via RSS