Colossal Wreck #

OZYMANDIAS.      Ozymandias
I MET a Traveller from an antique land,
Who said, “Two vast and trunkless legs of stone
Stand in the desart.  Near them, on the sand,
Half sunk, a shattered visage lies, whose frown,
And wrinkled lip, and sneer of cold command,
Tell that its sculptor well those passions read,
Which yet survive, stamped on these lifeless things,
The hand that mocked them, and the heart that fed:
And on the pedestal these words appear:
“My name is OZYMANDIAS, King of Kings.”
Look on my works ye Mighty, and despair!
No thing beside remains.  Round the decay
Of that Colossal Wreck, boundless and bare,
The lone and level sands stretch far away.

Percy Bysshe Shelley in the January 11, 1818 edition of The Exmainer, under the penname of Glirastes (a "portmanteau of Shelley's own design, combining the Greek suffix erastes, meaning 'lover of,' and the Latin Gliridae, the scientific term for the family of the dormouse. Signing 'Ozymandias' with the name Glirastes, lover of dormice, was an inside joke and a show of Shelley's affection for Mary.").

Audio version as read by Richard Attenborough in Trespasser.

/misc | Jan 09, 2021

An indiction or so late in posting this addition to the graphics page... #

🌱 Picture Resizer [395k] + Drag and drop to batch resize images. Rename executable to change parameters like size, sharpness, and recursion, or run via command line for more options. (Variously referenced as "PhotoResize", "PhotoResizer", and "Photo Resizer" in the documentation and version info.) 📺

/windows | Dec 17, 2020

Force MacBook to mirror displays #

When connecting an external monitor to a MacBook, the screen is extended rather than mirrored by default, making it difficult to work around broken internal monitors. One of these keyboard shortcuts should switch your Mac to mirrored mode:

Pressing the shortcut again will toggle back to extended mode.

H/T: OSXDaily and Miko.

/mac | Dec 17, 2020

Blocking Apple from bypassing application firewalls in Big Sur #

UPDATE: According to Patrick Wardle, "As of macOS 11.2 beta 2, the (in)famous ContentFilterExclusionList is gone!"

In addition to the hacky workaround previously outlined in these pages and Objective Development's steps for enabling Little Snitch 4.6 under Big Sur, there is now a third option for preventing Apple from bypassing application firewalls, courtesy of Hany (author of Murus and Vallum): Exclusions Blaster. Simply copy to /Applications, run, and approve the system extension when prompted - that's it!

Exclusions Blaster screenshot

Successfully tested under both Intel and M1 Macs, though the README warns that it is "experimental".

/mac | Dec 16, 2020

Chuang Tzu's Great Man #

from Chapter 17, Autumn Floods:

莊子 Literal
therefore great person action
not cause harm person
not much benevolent charity
move not for profit
not mean gate servant
goods wealth not strive
not much speech permit
business not borrow person
not much eat strong
not mean greedy vile
act special ordinary
not much different
follow multitude
not mean glib flatter
world rank emolument not satisfy persuade
disgrace shame not attain disgrace
know right wrong not able distinguish
small great not able differentiate
hear said
Dao person not hear
extreme virtue not obtain
great person no self
limit distinguish extreme
Brook Ziporyn Thomas Merton
"So the conduct of the Great Man harms no one, but he places no special value on humanity and kindness. His actions are not motivated by profit, but he does not despise those who slavishly subordinate themselves to it. He does not fight over wealth, but he places no special value on yielding and refusing it. He doesn’t depend on others, but he places no special value on self-sufficiency. He does not despise the greedy and corrupt, and though his own conduct is unconventional, he places no special value on eccentricity and uniqueness. His actions do [not] follow the crowd, but he does not despise the obsequious flatterers. All the honors and stipends in the world are not enough to goad him into doing anything, and all its punishments and condemnation are not enough to cause him shame, for he knows that right and wrong cannot be definitively divided, and that no border can be fixed between great and small. I have heard it said, 'The man of the Course has no reputation; perfect Virtuosity achieves nothing; the Great Man has no fixed identity.' For he holds perfectly to the differing allotment of things." The man in whom Tao
Acts without impediment
Harms no other being
By his actions
Yet he does not know himself
To be "kind," to be "gentle."

The man in whom Tao
Acts without impediment
Does not bother with his own interests
And does not despise
Others who do.
He does not struggle to make money
And does not make a virtue of poverty.
He goes his way
Without relying on others
And does not pride himself
On walking alone.
While he does not follow the crowd
He won't complain of those who do.
Rank and reward
Make no appeal to him;
Disgrace and shame
Do not deter him.
He is not always looking
For right and wrong
Always deciding "Yes" or "No."
The ancients said, therefore:

"The man of Tao
Remains unknown
Perfect virtue
Produces nothing
Is 'True-Self.'
And the greatest man
Is Nobody.
Martin Palmer Patrick Edwin Moran
'So it is that the great man through his actions will not set out to harm others, nor make much of benevolence and charity; he does not make any move for gain, nor consider the servant at the gate as lowly; he will not barter for property and riches, nor does he make much of his having turned them down; he asks for no one's help, nor does he make much of his own self-reliance, nor despise the greedy and mean; he does not follow the crowd, nor does he make much of being so different; he comes behind the crowd, but does not make much of those who get ahead through flattery. The titles and honours of this world are of no interest to him, nor is he concerned at the disgrace of punishments. He knows there is no distinction between right and wrong, nor between great and little. I have heard it said, "The Tao man earns no reputation, perfect Virtue is not followed, the great man is self-less." In perfection, this is the path he follows.' "...For that reason, the behavior of the great man does not proceed from any intention to do injury to others, neither does it go overboard with benevolence or kindness. His activities are not done for the sake of profit, yet on the other hand he does not despise those who take employment as doormen or as other attendants. In disputes over goods or materials he does not depend overly on rhetorical skills, but on the other hand he is not too greatly self effacing. When there are tasks to be done he does not depend on other people to do things for him, but he also does not greatly tout his self reliance, and he does not despise political favors. His behavior is different from ordinary people, but he avoids departing too far from customary norms. While he intends to follow along with the masses, he does not despise others who may depend on eloquence and flattery. The emoluments and official ranks of the common world are insufficient to influence him, and neither death nor being shamed are sufficient to make him feel disgraced. He knows that affirmations and denials are insufficient to make any real discriminations among things, but neither can ideas of the fine and the gross enable people to make real distinctions. I have heard it said that 'The man of the Dao does not have fame. The man of highest virtue does not have virtue. The great man has no self.' That shows how far one can take restrictions [to categories] and divisions [into groups]."
Herbert Giles Burton Watson
Therefore, the truly great man, although he does not injure others, does not credit himself with charity and mercy. He seeks not gain, but does not despise his followers who do. He struggles not for wealth, but does not take credit for letting it alone. He asks help from no man, but takes no credit for his self-reliance, neither does he despise those who seek preferment through friends. He acts differently from the vulgar crowd, but takes no credit for his exceptionality; nor because others act with the majority does he despise them as hypocrites. The ranks and emoluments of the world are to him no cause for joy; its punishments and shame no cause for disgrace. He knows that positive and negative cannot be distinguished, that great and small cannot be defined.

"I have heard say, the man of TAO has no reputation; perfect virtue acquires nothing; the truly great man ignores self;—this is the height of self-discipline."
"Therefore the Great Man in his actions will not harm others, but he makes no show of benevolence or charity. He will not move for the sake of profit, but he docs not despise the porter at the gate. He will not wrangle for goods or wealth, but he makes no show of refusing or relinquishing them. He will not enlist the help of others in his work, but he makes no show of being self-supporting, and he does not despise the greedy and base. His actions differ from those of the mob, but he makes no show of uniqueness or eccentricity. He is content to stay behind with the crowd, but he does not despise those who run forward to flatter and fawn. All the titles and stipends of the age are not enough to stir him to exertion; all its penalties and censures are not enough to make him feel shame. He knows that no line can be drawn between right and wrong, no border can be fixed between great and small. I have heard it said, 'The Man of the Way wins no fame, the highest virtue wins no gain, the Great Man has no self.' To the most perfect degree, he goes along with what has been allotted to him."
Sam Hamill James Legge
"So great people don't hurt others. But they don't concern themselves much with benevolence or mercy either. Profit is never their motive, but they're not bad tippers. They don't compete for property and wealth, but they don't make a big show of turning it down, either. They don't recruit helpers for their work, but they don't show off their independence. They don't despise the mean and greedy, and while they stay clear of those bad habits, they don't make a display of their difference. They go along with the crowd and don't look down on its glib, fawning leaders. The rank and rewards of the world can't move them. The punishment and blame of the world can't shame them. They know 'right' and 'wrong' are not so easily divisible—no more than 'big' and 'little.' I've heard it said that those with the Tao will not be heard of, that getting the Power of Virtue is not 'getting.' Great people have no selves. They find their parts in life. Now that's being there." 'Therefore while the actions of the Great Man are not directed to injure men, he does not plume himself on his benevolence and kindness; while his movements are not made with a view to gain, he does not consider the menials of a family as mean; while he does not strive after property and wealth, he does not plume himself on declining them; while he does not borrow the help of others to accomplish his affairs, he does not plume himself on supporting himself by his own strength, nor does he despise those who in their greed do what is mean; while he differs in his conduct from the vulgar, he does not plume himself on being so different from them; while it is his desire to follow the multitude, he does not despise the glib-tongued flatterers. The rank and emoluments of the world furnish no stimulus to him, nor does he reckon its punishments and shame to be a disgrace. He knows that the right and the wrong can (often) not be distinguished, and that what is small and what is great can (often) not be defined. I have heard it said, "The Man of Tâo does not become distinguished; the greatest virtue is unsuccessful; the Great Man has no thought of self;"— to so great a degree may the lot be restricted.'
Altair Unattributed*
"Therefore, while the behavior of the great man does not stem from harming others, he does not make much of his kind and gracious acts. While his movements are not for profit, he does not despise the porter at the gate. While not striving after property, he does not make much of politely turning it down. While engaging in anything and not borrowing from others, he does not make much of eating from his own strength nor despise corruption. While his conduct is exceptional among the common people, he does not make much of being an unusual phenomenon. While yielding to the opinion of the masses, he does not despise flattery. The world's titles and emoluments are not enough to urge him on; its executions and humiliations are not enough to shame him. He knows right and wrong cannot be parted, the fine and the gross cannot be distinguished. I have heard said: "The man of the Dao is not famous, supreme virtue is not obtained, the great man is impartial." It is the height of restraining differentiation. 28 The men of perfect practice don't do harm to others but they don't make efforts to do well everywhere. Their deeds aren't based on interest, while they don't consider it is wrong that philistines seek pretty interest and pretty position and ask for money. They don't scramble for the present wealth, but they will not pretend to be lofty to refuse the interest in hand.

29 They would like to accomplish everything by themseles. They would not bother others unless by no choice. They don't pant for making more money; however, they don't condemn and scorn the common people who strive for money.

30 The men of perfect practice are different in deeds, living customs and mindset from the common people but you can't say that they are weird. They don't look like Hippie with queer clothes and unique behavior. They do in Rome as Rome do, act as the same as the common people. In society, they stand with the masses. They don't flatter somebody for convenience and personal interest and echo the opinion of a few man of high position. Nevertheless, they think it as living tactics that some philistines adore hero and flatter man of high position. They don't consider it is wrong or mean.

31 Fame, position and wealth can't lure them because these are not their goal of life. High pressure, punishment and insult can't change their thought and deed too. They are tough and persistent. Why are they so, it is because they are deeply aware that right and wrong, small and big, rich and poor, and nobleness and humbleness are not absolute but relative.

32 The saying in this world goes well --- a man of practice seeks no fame and virtue. A man who practices to a certain level doesn't seek anything. The true man of perfect practice even forgets his own body---, which maybe is the best conclusion for our discussion about size and shape, rich and poor, and nobleness and humbleness.

* Grammatical and spelling errors have been left intact.

Victor Mair has excluded this passage from his Wandering on the Way: Early Taoist Tales and Parables of Chuang Tzu (see ellipsis on page 155 of the April 2000 University of Hawaii Press edition). A possible explanation from Paul Rouzer's A New Practical Primer of Literary Chinese:

"This passage to the end of the chapter may seem a non sequitur. What does a discussion of the behavior of the 'Great Man' have to do with metaphysical categories of size analyzed earlier? Consequently, some have assumed that the rest of this lesson's text has been interpolated and have removed it. However, if the author is attempting to show how our mental categories are conventional and arbitrary, then he can also claim that our behavior in the world should not be based on absolute and unchanging standards as well."

/misc | Oct 27, 2020

Whose computer is it? #

Patrick Wardle highlighted a tweet by Maxwell ("Some Apple apps bypass some network extensions and VPN Apps. Maps for example can directly access the internet bypassing any NEFilterDataProvider or NEAppProxyProviders you have running"), sparking an extensive HN discussion on Apple's ham-fisted tactics (not unlike Google's recent behavior).

A search for "NEFilterDataProvider" turned up David Dudok de Wit's post fingering the ContentFilterExclusionList key in /System/Library/Frameworks/NetworkExtension.framework/Versions/A/Resources/Info.plist as the culprit. The default list includes 56 Apple apps and daemons like App Store, MusicLibrary, softwareupdated, etc.:

Deleting those entries under Big Sur turned out to be rather involved; in fact, one could be forgiven for coming away with the vague suspicion that Apple would prefer them not to be disturbed:

  1. Disable FileVault

  2. Boot into macOS Recovery, disable SIP (csrutil disable) and SSV (csrutil authenticated-root disable), and reboot

  3. Find the root mount device, e.g.,
    % mount
    /dev/disk1s5s1 on / (apfs, local, read-only, journaled)

  4. % mkdir mnt

  5. % sudo mount -o nobrowse -t apfs /dev/disk1s5 mnt/

  6. Edit Info.plist as desired, e.g., % sudo vi mnt/System/Library/Frameworks/NetworkExtension.framework/Versions/A/Resources/Info.plist

  7. % sudo bless --folder mnt/System/Library/CoreServices --bootefi --create-snapshot && sudo reboot

Little Snitch 5 and TripMode 3 had no problem blocking the previously-cloaked processes afterwards:

Little Snitch 5 TripMode 3

though one may well be left with a niggling doubt: should all this really be necessary to monitor your own computer's network traffic?

UPDATE 1: Hany, author of Murus and Vallum, was kind enough to reply with some testing of his own:

I did some tests and I’ve found at least one major issue on Catalina.
Removing all entries from the dictionary key seems to work for most listed processes: connections are seen by the network filter and flows are passed/blocked according to matched rules. But it does not work for at least one of the listed processes: IMTransferAgent. If you use macOS then you may be aware that this process is used to send messages attachments.
If removed from the list, the process is always blocked. The filter provider does not see any flow for that process, and any attempt to send attachments with will fail until you disable the filter.

UPDATE 2: The traffic of some Apple processes isn’t shown in Little Snitch 5.

UPDATE 3: Enabling Little Snitch 4.6 kext under Big Sur

UPDATE 4: Tweet by Apple developer Russ Bishop: "Some system processes bypassing NetworkExtensions in macOS is a bug, in case you were wondering." and some replies:

UPDATE 5: Exclusions Blaster

UPDATE 6: Hooray, no more ContentFilterExclusionList

/mac | Oct 21, 2020

Batch convert Safari webarchive files to PDF #

via Terminal & textutil/cupsfilter

textutil -convert html *.webarchive && for i in *.html ; do cupsfilter "$i" > "$i".pdf ; done

via Automator & Download URLs as PDFs action

via AppleScript & Safari

-- Keep code for Safari separate from the code for System Events.
tell application "Safari"
   -- Tell Safari, as the known frontmost application, to display the 'choose folder' dialog.
   set SaveFolderPath to POSIX path of (choose folder with prompt "Select Folder to Save PDF Files")
   tell window 1
       set current tab to tab 1
       set ctabs to (count tabs)
   end tell
end tell

repeat with i from 1 to ctabs
   tell application "System Events"
       tell process "Safari"
           click menu item "Show Reader" of menu "View" of menu bar 1
           click menu item "Export as PDF…" of menu "File" of menu bar 1
           repeat until exists sheet 1 of window 1
               delay 1
           end repeat
           -- The sheet opens alread primed with a file name based on the tab name.
           if (i is 1) then
               -- Make sure the file gets saved to the folder chosen above.
               -- This is only necessary first time round the repeat, as the folder becomes the default next time.
               keystroke "g" using {command down, shift down}
               repeat until exists sheet 1 of sheet 1 of window 1
                   delay 1
               end repeat
               log "passed delay"
               tell sheet 1 of sheet 1 of window 1
                   set value of combo box 1 to SaveFolderPath -- NB. the folder path here, not the file name.
                   click button "Go"
               end tell
           end if
           click button "Save" of sheet 1 of window 1
           click menu item "Close tab" of menu "File" of menu bar 1
       end tell
       tell application "Safari" to display dialog "Close after 1 second..." giving up after 1
   end tell
end repeat

via Paparazzi!

via EagleFiler & Web archive to PDF script

See also

/mac | Oct 11, 2020

Back up iOS apps to a PC or Mac #

A little history

Before iOS 9, iOS apps could be backed up to Macs and PCs via iTunes1:

Adding insult to injury, iTunes 12.7 removed the App Store, closing the door on downloading/backing up iOS apps from there:

Why bother?

You may want to back up an app before it disappears from the App Store or preserve an older, better version, e.g.,

Download iOS apps from Apple to a PC or Mac

iOS apps can still be downloaded via iTunes 12.6.3 (does not run on Mojave or higher), Apple Configurator 2 (with some caveats), or iMazing:

Copy apps from an iOS device to a PC or Mac

To back up all apps on your iOS device to apps/ in the current directory of your Mac, jailbreak your device, install usbmuxd, start iproxy, then:

$ scp -P 4444 -r root@localhost:/var/containers/Bundle/Application apps/

Convert iOS .app to .ipa

$ mkdir Payload
$ cp -R Payload/
$ zip -r appname.ipa Payload/

Install .ipa from a PC or Mac to an iOS device


  1. The backups were located in:

  2. Apple Configurator 2 also allows installing an iOS .app via Actions → Add → Apps... → Choose from my Mac...

See also

/mac | Sep 28, 2020

iOS Safari has a weight problem #

The auspiciously-titled Safari hogging up storage on your iPhone? Here's the fix! exhorts users to tap Settings → Safari → Advanced → Website Data → Remove All Website Data (mgmiller68 wonders in the comments how this differs from Settings → Safari → Clear History and Website Data); alas, neither method proved efficacious.

Others advise waiting days for the issue to clear; sadly, not even weeks availed.

Still others recommend a draconian backup, wipe, and restore approach.

Macworld's Documents & Data: A mysterious black hole of data storage in iOS concludes unpropitiously:

"At a minimum, I’d like to know what’s taking up all that space. Those 7GB of Documents & Data probably include something that’s gotten stuck, that can’t be deleted, such as an old iOS update perhaps. But it would be helpful if every app had to offer a feature to delete its caches, or if there were a global Clear Caches feature in iOS."

Found the offending files by jailbreaking and SSHing into the device then:

# cd /var/mobile/Containers/Data/Application/

# find . -name Safari

# cd {GUID}

# du -h
4.0G    ./tmp/Download-tCA2Caas
3.7G    ./tmp/Download-UT0Nlzkj
7.8G    ./tmp
8.0G    .

Emptying the tmp directory did the trick:

Before After
iPhone 28.5 of 32GB used iPhone 19.9 of 32GB used
Safari 8.5 GB Safari no longer showing

H/T jareehD for the filepath hint.

/misc | Sep 26, 2020

Deleting a subdirectory in the path of a URL via sed or perl #

Delete the divers subdirs which appear between "/blog/" and the filenames in this example:

$ cat index.rss

with GNU sed:

$ sed -i -E 's ([a-z]+ \1 ' index.rss

or Perl:

$ perl -pi -e 's|([a-z]+|\1|' index.rss

/nix | Sep 13, 2020

Subscribe or visit the archives.