• 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)

  • SCOTUS nixes injunction that limited Biden admin contacts with social networks [Ars Technica ]

    cool… that’s… oh…

    just ahead of SCOTUS plans / wishes for a 2nd Trump “administration”

  • 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 (containing dot)

  • dump iCloud Mail Rules to human-readable format

  • 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, and sharing -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 cron sharing -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”.

  • safety tip for using `tar` and `--option`s

    this will fail (it ignores the excludes - frustrating!):
    tar -cf /dev/null ./ --exclude-from=file-of-excludes

    this will work:
    tar -cf /dev/null --exclude-from=file-of-excludes ./

    (hint: put the options before the path to archive)

  • SMBC is brilliant - as usual:
    www.smbc-comics.com/comic/sel…

  • 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!

  • there’s something about meditation, wherein judgement is suspended… which seems notable / useful - to maybe carry into everyday life

  • csvkit to import CSVs in a uniform format

    I’ve really been enjoying the power of csvkit to reliably munge CSVs into a uniform format - regardless the format from the provider (not only the order of columns, but also more complex transformations like whether debits are positive or negative):

    SQLALCHEMY_SILENCE_UBER_WARNING=1 csvsql --no-inference \
    --query 'SELECT COALESCE("Transaction Date",""),"=-"||COALESCE("Amount (USD)",""),COALESCE("Category",""),COALESCE("Description","")||"||"||COALESCE("Merchant","")||"||"||COALESCE("Type",""),"Apple Card" \
    FROM stdin' \
    | csvformat -T | tail -n+2 | sort
    

    ref: https://csvkit.readthedocs.io/

  • 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

  • brilliant - and beautiful!
    a human “walk” through time, across the earth
    out-of-eden-walk.nationalgeographic.org/media/201…

  • In the story about VT’s US Rep Becca Balint and contributions by crypto-jerk SBF, theVPO has it right: thevpo.org/2023/10/2…
    Sadly, coverage by both VTDigger & SevenDays is uncharacteristically sensationalist - a glaring and concerning shift. What’s up there?

  • $14 / month - and you better believe you’re still the product 🤮
    arstechnica.com/tech-poli…

  • it’s increasingly easy, to feel like the formerly reasonable expectations, of working hard, are now less and less likely to happen, as we descend further into dog-eat-dog.
    so, the choice is between: a) get increasingly resentful; b) temper expectations - while continuing to fix this broken system

  • with piles of books across the place (and devices) I noticed that, depending which pile I find myself at, I’m reading both “The Midnight Kingdom” by Jared Yates Sexton [@JYSexton], and “How to Be an Antiracist”, by Ibram X. Kendi [@ibramxk] - concurrently.
    and, each being seriously grounded in important - and suppressed - history, I find that they’re almost meant to be read together.
    much learning - and much needed.
    which reminds me, that I’ve also been meaning to read Howard Zinn’s “A People’s History of the United States”.

    www.penguinrandomhouse.com/books/673…
    books.apple.com/us/book/h…
    www.howardzinn.org/collectio…

  • Wow: The Nib is sadly on the way out 😢 - but making all their mags available for free download!
    membership.thenib.com/donate-fr…
    (These folks are amazing - please consider tipping them!)

  • 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.)

  • Keef, with a great way to look at our obligation to actively make a better world: www.dailykos.com/stories/2…

subscribe via RSS