Heaven help you:
Barring divine intervention, Windows 10 Enterprise LTSC 2019 (formerly LTSB) may be the least bad option:
However, be aware that LTSC requires a volume license (VL) agreement, making onerous audits potentially more probable:
(despite Microsoft's own apparent need for a thorough inspection:
While five licenses are required to enter into a new VL agreement, they need not all be for LTSC. According to a rep I spoke with at a Microsoft Partner, this combination would work as an upgrade from a Windows OEM license (i.e., it would allow a user who bought a PC with Windows 10 preinstalled to run Windows 10 LTSC instead):
Here are links and prices from three well-known Microsoft Partners, though you should definitely confirm details with a rep before purchasing:
For those hapless souls stuck on Windows 10 Home or Pro, see:
Further reading:
Updates:
/windows | Nov 30, 2018
Yet more...
UPDATE: Monterey: "A required firmware update could not be installed."
/mac | Nov 19, 2018
MacBook and MacBook Pro: Mac reduces processor speed when battery is removed while operating from an A/C adaptor - "If the battery is removed from a MacBook or MacBook Pro, the computer will automatically reduce the processor speed. This prevents the computer from shutting down if it demands more power than the A/C adaptor alone can provide."
Apple Notebooks Take Huge Performance Hit without Battery - "Apple's reason for forcing a drop in processor speed doesn't make a whole lot of sense."
MacBooks Run Slow Without Battery - "Gearlog's own results show a decrease of 36 percent in processor speeds without a battery attached on their unibody MacBook Pro. Our own tests show a decrease of 50 percent when rendering with one CPU, a decrease of 52 percent in multiprocessor rendering, while the GPU suffered a 40 percent decrease in performance."
"Fixing" kernel_task CPU Problems in MacOS 10.7/10.8 - Tweak IOPlatformPluginFamily.kext to disable throttling on faulty battery.
Disable OS X kernel_task throttling - Updated instructions for removing IOPlatformPluginFamily.kext.
/mac | Nov 15, 2018
See also Breathing new life into a 2006 MacBook and Apple's New Hardware With The T2 Security Chip Will Currently Block Linux From Booting
With OS X 10.11 El Capitan no longer receiving security updates1, unsupported but otherwise excellent hardware like the MacBook Pro (15-inch, Mid 2009) can be revitalized with Linux.2
After some false starts with the usual suspects (namely Linux Mint 19 (both Mate & XFCE), Elementary 5, Fedora Workstation 26, and Pop!_OS 18.04 LTS), I decided to give Manjaro XFCE 17 a try after seeing it regularly mentioned in HN comments.
After struggling with previous distros, Manjaro was a dream: boot and shutdown times were halved (at least), the boot splash screen displayed properly (rather than just displaying a black/blank screen like so many others), WiFi and video drivers working right out of the box, and there was no screen flickering or taskbar weirdness. In short, Manjaro presented the most polished experience, from start to finish, of the bunch.
However, during install, Manjaro requires creating a password for the root account, which is subsequently enabled. If you prefer to disable it after installation is complete:
$ sudo passwd --status root root P 10/29/2018 -1 -1 -1 -1 $ sudo passwd --delete --lock root passwd: password expiry information changed. $ sudo passwd --status root root L 10/29/2018 -1 -1 -1 -1
Test:
$ su Password: su: Authentication failure
To reenable root:
$ sudo passwd root New password: Retype new password: passwd: password updated successfully $ sudo passwd --status root root P 11/01/2018 -1 -1 -1 -1
Footnotes
Why doesn't Apple just come out with an official macOS support policy? It's clearly and consistently been 3 years from release on modern versions, why not share that with consumers? Speaking of which, why not warn them when they are running an unsupported and unsafe version (something even Microsoft, hardly renowned for its stellar consumer support, did for Windows XP)? Within the last week or so, I've had two different people contact me with problems which turned out to be caused by running OS X 10.7 and OS X 10.8 respectively! See also No more security patches for OS X El Capitan, time to upgrade and Apple has released Mojave 10.14.1 update, and Security Updates for Sierra and High Sierra.
There's also Collin's kind patcher collection of course (macOS Sierra Patcher Tool for Unsupported Macs, macOS High Sierra Patcher Tool for Unsupported Macs, and macOS Mojave Patcher Tool for Unsupported Macs) if you don't mind disabling SIP, limited WiFi support, and trusting third-party, closed source software with deep access.
/mac | Nov 01, 2018
/nix | Oct 28, 2018
Having set up IFTTT to autopost blog updates on a recovered Twitter handle, I did my best to forget all about it.
However, I recently discovered that Twitter automatically inserts hyperlinks for text that matches certain patterns (e.g., "Mail.app" becomes a link to said domain), prompting me to go back and delete such tweets, namely:
I was able to delete today's earlier tweet (Mojave - Where did DVD Player.app go?) and repost it with the hyperlink disabled (why can tweets not be edited?) by inserting a zero width space after the dot as explained by Amit Agarwal.
See also:
/misc | Oct 23, 2018
It's been moved from /Applications/ to /System/Library/CoreServices/Applications/. Due to SIP, "Make Alias" is not available from the Finder's context menu in that directory, nor does the new Make Alias keyboard shortcut (Ctrl+Cmd+A - really, Apple?! Cmd+L does not appear to have even been reassigned!) work.
If you'd like a Finder alias for DVD Player in the Applications folder*, one can be created via AppleScript like so:
tell application "Finder" to make alias file to (POSIX file "/System/Library/CoreServices/Applications/DVD Player.app") at (POSIX file "/Applications")
* To its credit, Apple still provides the "CDs & DVDs" preference pane, which offers an option to open DVD Player when a video DVD is inserted, but some may prefer another action or to launch DVD Player manually to play VIDEO_TS files, etc.
/mac | Oct 23, 2018
As reported by Howard Oakley, Apple has stopped maintaining its printer compatibility list and is apparently only supporting AirPrint going forward.
I scoured support.apple.com for the final printer driver versions, preferring to archive them locally rather than rely on Software Update. The inconsistent naming conventions and system requirements sections have been preserved intact:
/mac | Oct 19, 2018
Network problems encountered include: web browsers crashing, websites not loading, yield symbol appearing over the notification area's WiFi or Ethernet icon, "No Internet, secured", etc.
Solution: disable DNS Client by changing the value data for HKLM\SYSTEM\ControlSet001\Services\Dnscache\Start from 2 (automatic) to 4 (disabled) (recent versions of Windows 10 no longer allow disabling DNS Client via services.msc).
References and more information:
An alternative (albeit less performant) method is to compress the hosts file.
Disabling the Windows "DNS Client" service - Windows 2000 and later have a "DNS Client" service which is enabled by default. This service caches DNS lookups for the local computer only. This potentially saves a bit of bandwidth and makes DNS lookups a bit faster by preventing DNS lookups from being sent over the Internet connection if the same data has recently been requested on this same computer.
StevenBlack/hosts: Extending and consolidating hosts files - Extending and consolidating hosts files from several well-curated sources like adaway.org, mvps.org, malwaredomainlist.com, someonewhocares.org, and potentially others. You can optionally invoke extensions to block additional sites by category.
Check any downloaded hosts files for nefarious entries with this oneliner: grep -v '#' hosts_file | awk '{print $1}'| sort | uniq -c
If you are using hosts to block malicious sites, Quad9 may also interest you: New "Quad9" DNS service blocks malicious domains for everyone
How to troubleshoot a Windows 10 service which does not let me stop it
Anyone knows how to disable the DNS Client service on the Fall Creators Update?
/windows | Sep 30, 2018
is theoretically possible via Google Takeout, but there are issues:
timeouts during large downloads: "Failed - Needs authorization", "Failed - Network error", etc
all email dumped into a single MBOX file by default* (albeit with labels saved in the non-standard "X-Gmail-Labels" header, which can be queried in Thunderbird, for example) or optionally into multiple MBOX files based on labels (resulting in large numbers of duplicate messages)
Got Your Back (GYB) does not suffer from these issues; messages are downloaded as individual EML files, sorted into folders by year, month, and day:
$gyb --email name@example.com --action estimate
Select the actions you wish GYB to be able to perform for name@example.com [ ] 0) Gmail Backup And Restore - read/write mailbox access [ ] 1) Gmail Backup Only - read-only mailbox access [ ] 2) Gmail Restore Only - write-only mailbox access and label management [*] 3) Gmail Full Access - read/write mailbox access and message purge [ ] 4) No Gmail Access [ ] 5) Groups Restore - write to G Suite Groups Archive [*] 6) Storage Quota - Drive app config scope used for --action quota 7) Continue 7 Your browser has been opened to visit: https://accounts.google.com/o/oauth2/auth... If your browser is on a different machine then press CTRL+C and create a file called nobrowser.txt in the same folder as GYB. Authentication successful. Got 67100 Message IDs GYB needs to examine 67100 messages GYB already has a backup of 0 messages GYB needs to estimate 67100 messages Estimated size 26.47gb 67100/67100 messages $gyb --email name@example.com --action backup
Using backup folder GYB-GMail-Backup-name@example.com Got 67100 Message IDs GYB needs to examine 67100 messages GYB already has a backup of 0 messages GYB needs to backup 67100 messages backed up 67100 of 67100 messages GYB needs to refresh 0 messages
If desired, import the collection into Thunderbird via ImportExportTools.
If you need to copy the massive collection of EML files, tar it without compression to save a LOT of time (pv is of course optional, but very handy when tarring tens of thousands of files):
$ tar -c ./GYB-GMail-Backup-user\@example.com/ | pv -s $(gdu -sb ./GYB-GMail-Backup-user\@example.com/ | awk '{print $1}') > user\@example.com.tar
4.03GiB 0:00:23 [ 177MiB/s] [====> ] 15% ETA 0:02:08
* Attempting to split a ~26GB MBOX file by label via mbox_split.py or WB Optimum's script on which it is based did not avail.
UPDATE: Royce Williams kindly informs us of outtake, which "sync[s] Gmail to maildir...quickly", "uses the Gmail API to efficiently sync only deltas", and "can also be limited to a specific label". Crafted in Go by Google software engineer, Daniel Margolis.
/misc | Sep 25, 2018
/nix | Sep 13, 2018
In an Adaptec SCSI Card 29320LPE's Adaptec SCSISelect Utility, neither "Format Disk" nor "Verify Disk Media" would work for two Fujitsu Ultra-320 SCSI 146GB (MAW3147NC) hard drives, immediately returning "Unexpected SCSI Command Failure" and "00h - No SCSI controller error". Both functions worked normally on two Seagate Ultra-320 SCSI 73.4GB (ST373405LC) drives.
When a Verify or Low Level Format is attempted on the hard drive, it responds with some error codes did not sound very promising:
If the error occurs in both Format and Verify, it usually indicates a defective drive. Contact the drive vendor for interpretation of other errors.
Happily, Unexpected SCSI command failure message when attempting low level format held the answer:
One reason for this could be the way the SCSI controller is set up to hand-shake with the device. This can be changed through the SCSISelect utility. Enter the SCSI Select utility by pressing CTRL-A on system boot or insert the SCSI Select diskette.
In the SCSI Select utility, take the option for Configure/View Host Adapter Settings. Then choose SCSI Device Configuration.
On the next screen you will see the SCSI ID's listed across the top and the options to set for each ID listed down the left side. For the SCSI ID of the hard drive that you are trying to verify or format, set Initiate Sync Negotiation to NO ( on U160/U320 controllers change Initiate Wide Negotiation = No), Enable Disconnection to NO, and Maximum Sync Transfer Rate to 5mb/sec. Exit the utility, saving the changes.
While "Verify Disk Media" failed if run first, running "Format Disk" then "Verify Disk Media" worked. Increasing the "Maximum Sync Transfer Rate" to 40MB/sec had no ill-effect and made verifying the format via hexdump much faster.
/misc | Sep 13, 2018
tell application "Contacts"
-- Path to file containing list of contacts (one per line) to add to group
set groupList to "Macintosh HD:Users:foo:grouplist.txt"
-- Read lines from groupList
set groupMembers to paragraphs of (read file groupList as «class utf8»)
-- Add each name to a pre-existing Contacts.app group named "Friends"
repeat with i in groupMembers
set aMember to (first person whose (name is i))
add aMember to group "Friends"
end repeat
save
end tell
-- Any mismatch between names in grouplist.txt and Contacts.app will return an invalid index error along with the errant name, resulting in no names being added to the group.
-- Tested in macOS 10.12 and 10.13
-- Hat tip: mklement0's script: https://stackoverflow.com/a/30407353/
/mac | Sep 12, 2018
Recently there have been activation errors with Microsoft Office Home & Student 2016 for Mac and Microsoft Office Home & Business 2016 for Mac product keys:
Solution:
UPDATE: Sadly, the activation notification returned 24 hours later, counting down from 14 days. So far, have had to get a tier 2 tech at Microsoft resolve on their end in the dozen or so cases I've seen, but What to try if you can't install or activate Office 2016 for Mac offers troubleshooting tips for the following activation issues:
/mac | Aug 12, 2018
Live never to be ashamed if anything you do or say is published around the world -- even if what is published is not true.
—Illusions: The Adventures of a Reluctant Messiah by Richard Bach
A certain devotee asked Maharshi about some disagreeable statements made by a certain man well-known to Maharshi. He said, "I permit him to do so. I have permitted him already. Let him do so even more. Let others follow suit. Only let them leave me alone. If because of these reports no one comes to me, I shall consider it a great service done to me.
—Talks with Sri Ramana Maharshi recorded by Munagala Venkataramiah
He who with equanimity surveys
Lustre of goodness, strife of passion, sloth
Of ignorance, not angry if they are,
Not angry when they are not: he who sits
A sojourner and stranger in their midst
Unruffled, standing off, saying--serene--
When troubles break, "These be the Qualities!"
He unto whom--self-centred--grief and joy
Sound as one word; to whose deep-seeing eyes
The clod, the marble, and the gold are one;
Whose equal heart holds the same gentleness
For lovely and unlovely things, firm-set,
Well-pleased in praise and dispraise; satisfied
With honour or dishonour; unto friends
And unto foes alike in tolerance;
Detached from undertakings,--he is named
Surmounter of the Qualities!
—The Song Celestial, Or, Bhagavad-gîtâ translated by Edwin Arnold
/misc | Aug 03, 2018
Metapad has a handy feature called Commit Word Wrap which inserts carriage returns into text based on the current window width (the command to remove them is Unwrap Lines).
The same functionality was available in TextWrangler 4.0.1 (download) but removed as of 4.5. Here's how to use it:
/mac | Jul 15, 2018
/windows | Jul 13, 2018
Microsoft Office Home and Student 2010 cannot verify the license for this product. You should repair the Office program by using Control Panel.
Microsoft's own "Microsoft Office cannot verify the license for this product" error when you start an Office app suggests disabling compatibility mode - no change.
Help Desk Geek's Fix MS Office "Cannot Verify License" Error Message offers four methods:
none of which worked initially, as the Activation Wizard unhelpfully offered:
Telephone Activation is no longer supported for your product.
Happily, Microsoft published a new number: +1-866-421-7141. Used with method 4 above to resolve.
/windows | Jul 13, 2018
Notes:
Update:
/misc | Jul 05, 2018
/nix | Jun 30, 2018
Rip DVD to VIDEO_TS
Run DVDStyler and select new project options (e.g., DVD-9 (8.5GB), NTSC 720x480, AC3, etc) based on values of source VOBs (check with ffmpeg or ffprobe) > OK > No template
Click DVD > Add > Titles from DVD... select VIDEO_TS directory > Open
Right click "Menu 1" in the Titleset Manager > Delete > Yes
Right click "Title 1" in the Titleset Manager > Properties...
Verify that video and audio are set to "Copy" (which will skip reencoding) and check "do not remultiplex/transcode" if possible (even if it is grayed out, only multiplexing will be performed)
Delete "call last menu;" from "Post commands:" (to prevent "Cannot jump to menu" error)
Click the green plus symbol > select your SRT file > Open (had to resave SRT in Notepad with UTF-8 encoding to resolve "Error 42 -- Illegal byte sequence -- decoding subtitle file at approx line...")
Click the ... button next to "Subtitle: srt"
Select language, charset, font face/size (the default 28pt Arial worked best, but there are many fans of PT Sans Narrow Bold), and fill color (light gray was more pleasing than the default yellow) > OK > OK
File > Burn DVD... > select "just generate" to create new VIDEO_TS with subtitles > Start
ffmpeg -i 'concat:VTS_01_1.VOB|VTS_01_2.VOB|VTS_01_3.VOB' -acodec copy -vcodec copy combined.mpg
cat *.vob > merged.vob
, the output of which had problems with the playback timeline and location. See VOB files reporting wrong playing time and DVDVob2Mpg's homepage. The latter states in part, "VOB and VRO files contain the MPEG, but also various other data, and headers may be incomplete or wrong etc. Because of that, VOB and VRO files typically don't play well using media players ... Typical problems are: timing issues, not being able to show the progress properly, no way to skip forward, crashes, missing audio, audio off sync, only showing the first 5 seconds of the video etc.")and adding it to a DVDStyler project generally allowed checking "do not remultiplex/transcode". However, the new process (using the entire VIDEO_TS directory) completes in almost exactly the same time and produces virtually identical results even if the box cannot be checked, as reencoding is not performed.
Another advantage of the new directions: obviating the need to deal with preexisting subpicture streams, which otherwise may need to be deleted before adding new subtitles:
Attempting to generate DVD returns "ERR: [duplicate substream ID 0x20" due to an existing subpicture stream with ID 0
Confirm in DVDSubEdit:
Current subpic info:
Subpic# = 0 (0 in stream)
StreamID = 0x20
...
Open VIDEO_TS\VTS_01_0.IFO in IfoEdit > VOB Extras > Strip Stream's [sic] > OK > uncheck SubPicture 1: English (2-bit rle ) (ID: 0x20) > click "Strip it" button (h/t rmdeboer82)
SubtitleCreator returned "Error reading subtitle number 3. (Input string was not in a correct format.)". Resolved by converting SRT to MicroDVD / SUB in Subtitle Workshop.
/misc | Jun 28, 2018
Save audio.rm to stream.dump:
$ mplayer -dumpstream -bandwidth 20000000 -cache 30000 -noframedrop rtsp://example.com/audio.rm
Direct audio output of stream.dump to audiodump.wav:
$ mplayer -ao pcm stream.dump
Sources:
Wikipedia entry on RealAudio file extensions:
RealAudio files were originally identified by a filename extension of .ra (for Real Audio). In 1997, RealNetworks also began offering a video format called RealVideo. The combination of the audio and video formats was called RealMedia and used the file extension .rm. However, the latest version of RealProducer, Real's flagship encoder, reverted to using .ra for audio-only files, and began using .rv for video files (with or without audio), and .rmvb for VBR video files. The .ram (Real Audio Metadata) and .smil (Synchronized Multimedia Integration Language) file formats are sometimes encountered as links from web pages (see Streaming Audio section below).
/nix | Jun 17, 2018
Purchased a NoFan CS-80 PC case after reading that it "offers 9 EZ-SWAP drive bays and screwless installation" and is "conveniently designed so that a drive can be easily attached or detached from a bay without any extra tool":
Should have glanced at the manual first, which shows 2.5" and 3.5" drives being screwed into the caddy:
Was expecting something actually tool-less, like this Corsair hard drive tray, which is at least screwless for 3.5" drives (2.5" drives mount to the bottom with screws):
Even better would be something completely tray-less, like the Corsair Carbide 200R's drive cage (though its plastic tabs should really be metal):
/misc | Jun 17, 2018
/nix | Jun 10, 2018
/misc | Jun 04, 2018
/nix | Jun 02, 2018
1. Simplest method:
$ ffmpeg -i in.mp4 out.gif
out.gif did not display in Finder, Safari, or Preview, but worked in Firefox and Chrome.
2. Oft-cited method using ffmpeg and convert:
$ ffmpeg -i in.mp4 -r 10 frames/frame%03d.png $ convert -delay 5 -loop 0 frames/frame*.png out.gif
out.gif was over 14 times larger than in.mp4.
3. Best results obtained via this advice:
$ ffmpeg -y -i in.mp4 -vf palettegen palette.png $ ffmpeg -y -i in.mp4 -i palette.png -filter_complex paletteuse -r 10 out.gif
out.gif was smaller than in.mp4, playable everywhere, and very high quality.
/nix | May 24, 2018
A subtle but deeply gratifying feature is how ScreenToGIF displays the current frame when highlighting a range of frames in the timeline (rather than statically displaying the first selected frame).
Additionally, it's:
/windows | May 21, 2018
These steps dumb down security advances made in later Windows versions in order to accommodate XP. Do not use them unless absolutely necessary; even then, do so at your own risk (and joy).
On Windows 10 PC:
AllowInsecureGuestAuth
and set its value data to 1
.On Windows XP PC:
You should now be able to map a network drive normally.
If you have trouble with "Reconnect at login" or "Connect using a different user name", consider a batch script in the Startup folder, e.g.,
ping 127.0.0.1 -n 11 >NUL & REM delay execution for 10 seconds
net use * /delete /yes & REM clear any existing mapped drives
net use x: \\WIN10PC\shared
If the Windows 10 and XP usernames and passwords match, you're done!
If they differ, you can simply store the Windows 10 username and password in Windows XP's Stored User Names and Passwords (aka Credential Manager); access via rundll32.exe keymgr.dll, KRShowKeyMgr
.
Otherwise, you could specify the username in the script, prompting the user for the password each time (e.g., net use x: \\WIN10PC\shared /user:xpuser *
), or you could store both the username and the password in the script (security-wise, not a great idea, but hey, you're still running Windows XP, so... net use x: \\WIN10PC\shared /user:xpuser password
).
Sources and more information:
/windows | May 17, 2018
Updates failed - Advanced Micro Devices, Inc - System - Error 0x80070002
Attempting to automatically update the driver in Device Manager returned:
AmdAS4 Device: The system cannot find the file specified.
HP's Software and Driver Downloads page for this laptop inexplicably does not include chipset drivers. However, thanks to Paul_Tikkanen's answer in Missing unknown driver ACPI\ASD0001\2&DABA3FF&2 (which took longer than a few seconds to find, hence this post), the error was resolved by downloading and installing the AMD Chipset Drivers (revision 18.10.0418, released 4/18/2018) directly from AMD.
/windows | May 13, 2018
(Note: This post is not about Windows 10's new Timeline feature (but don't miss Windows 10 Timeline Forensic Artefacts and WxTCmd, a parser for the Windows 10 Timeline database.))
Replay / rewind Windows events and actions to:
Unlike the lengthy forensic and incident response tools listed below, Nir Sofer's LastActivityView runs on a live system within seconds, reporting:
In 2014, Thomas Weller combined LastActivityView with a host of additional Nirsoft utilities to create Live System Timeline Builder, which builds a super timeline of a running Windows machine in seconds. The unified view includes results from:
While Live System Timeline Builder comes packaged as an installer, the resulting folder (%PROGRAMFILES(X86)%\WelliSolutions\LiveSystemTimeLineBuilder\) is completely portable; you just need LiveSystemTimelineBuilder.exe, EPPlus.dll, and the Providers subdirectory.
You can even update the Nirsoft apps in Providers as well (the latest RegDllView, 1.60, does not appear compatible, so stick with the included 1.58).
If you have more time to dig, there are a number of exhaustive (and time-consuming) timeline tools focused on forensics and incident response:
Autopsy "is a digital forensics platform and graphical interface to The Sleuth Kit and other digital forensics tools. It is used by law enforcement, military, and corporate examiners to investigate what happened on a computer." Includes detailed timeline analysis.
Crowd Response "is a lightweight Windows console application designed to aid in the gathering of system information for incident response and security engagements."
FastIR Collector "collects different artefacts on live Windows and records the results in csv or json files."
Forensafe Timeline Analyzer "will take physical and logical disks, image files and RAM as input to recover artifacts." (Project status unclear, but calimelo's reply in this thread includes a link to a password-protected RAR archive.)
ir-rescue - "A Windows Batch script and a Unix Bash script to comprehensively collect host forensic data during incident response."
KeyChain KeySpace "utilizes digital forensic techniques for cyber criminal investigations, internal audits, and industrial confidential disclosures. It is a solution that supports automatic analysis easily and conveniently. Analyze file formats and raw data for professional analysis." (via Google Translate)
plaso log2timeline - "Super timeline all the things" How to use log2timeline! includes an Excel color template. Results can also be parsed using Timeline Explorer.
Redline - "Thoroughly audit and collect all running processes and drivers from memory, file-system metadata, registry data, event logs, network information, services, tasks and web history."
Timesketch - "Collaborative forensic timeline analysis"
Virtual machine appliances:
* Unlikely that they erased all (if any) traces.
/windows | May 11, 2018
Footnotes:
/mac | May 09, 2018
For years, I used Stomp for resizing videos under OS X. However, in addition to recently being retired, it has had trouble processing a number of formats of late, either hanging altogether or displaying lengthy time estimates (e.g., ~6 hours to scale a 6 minute video by half).
Happily, ffmpeg makes quick work of scaling video while preserving the aspect ratio, e.g.,
$ ffmpeg -i in.mp4 -vf scale=640:-2 out.mp4
UPDATE: To optimize for web streaming, add -movflags faststart. To optimize existing videos for streaming without have to reencode, use ffmpeg -i in.mp4 -movflags faststart -acodec copy -vcodec copy out.mp4
/mac | Apr 28, 2018
Shangri-La?
I stepped outside and again I was struck by the magnificent view: a full circle of peaks surrounded the flat sea of the central plain dotted with its villages, refuges in a world unfit for man. If ever there lay a valley cut off from the world, a hidden, secret land, it was Zanskar. I could hardly believe that only recently I had left a world which is polluted and over-populated. Everything in Zanskar I found near to perfection: nothing, so it seemed, was out of place or unnatural. ... There was nothing here to tarnish the harmony of nature in which man has his natural place blending with the earth...
Fleas in Heaven
Finally I retired to a nocturnal safari against the terrible fleas. Someone, alas, had forgotten to explain to them the deadly effects of DDT, for they completely ignored the floods of insecticide with which I had covered my body. Leeches in the lower, damp southern Himalayas and fleas in the north are responsible for the real hardships of Himalayan travel. My parasites and I awoke early the next day.
At last I lay down to what I thought was well-earned sleep only to appreciate I had overlooked the fleas for which Kargil is famous. As I sat scratching myself I thought of all those travellers who had passed sleepless nights at this ancient crossroads of caravans heading for Tibet, Afghanistan, China and Sinkiang.
I must admit I needed self-control not to kill the fleas I caught in the chapel. Instead, with traditional respect for life, I placed the offenders on the ground without squashing them, thus leaving them free to start a new career on someone else.
For the night I was offered a small room in a large house that seemed neat and reasonably clean. Little could I then foresee that this was to result in severe wounds, much frustration and eight full days of furious scratching. 'To bite a flea is hardly food for the stomach but how nourishing for the soul,' goes a Tibetan proverb. I had to agree as, forgetting all taboos about respecting life, and in spite of the difference in size and the Geneva convention, I killed all prisoners!
Belief
Usually it takes me a week to get rid of the habits of my rational Western self, to stop querying every fact and figure and searching for an explanation to every phenomenon. This period over, I began to believe in witches and ghosts, gods and demons, good and evil spirits and endless other characters that in the West I liked to consider imaginary—in the same manner that Lobsang would consider unreal and laugh at all the dreary statistics in which we believe, such as the height in feet of our tallest buildings, or the exact distance in miles between the earth and the moon, the facts and figures which mould our lives and command respect in our figure-mad world. But what do figures mean, or spirits, if one does not believe in them? The answer is nothing, for it is Faith that counts. Often we would be at a loss to check many of the facts we believe in; we accept them with that same blind faith with which I now accepted the presence of demons and the miracle of the [imprint in rock of a] footprint [said to be Padma Sambhava's].
/misc | Apr 19, 2018
This post is for the scattered few who still sync calendars between their Mac and iOS device via USB, and find deleted calendars appearing in iTunes, despite those calendars not appearing in iCal / Calendar. Backup before proceeding. The iOS calendar(s) will be overwritten.
defaults delete com.apple.SyncServer SyncServicesResetWorldRunOnce
and reboot/System/Library/Frameworks/SyncServices.framework/Versions/A/Resources/resetsync.pl full
/System/Library/Frameworks/SyncServices.framework/Versions/A/Resources/resetsync.pl full
cd ~/Library/Application\ Support/SyncServices/
rm -r Local.*
cd Local
mv conflicts _conflicts_
In January of 2023, bidirectional calendar sync over USB stopped working between an iPhone SE (3rd generation) running iOS 16.2 and a MacBook Air (M2, 2022) running macOS 13.1; only unidirectional overwriting of the iPhone by the MacBook via Finder → iPhone → Info → "Replace Calendars" would work.
None of the above approaches nor a number of others (resetting network settings on the iPhone, erasing and restoring the iPhone, deleting the contents of ~/Library/Calendars/Pending\ Events/ (or, indeed, the entire contents of ~/Library/Calendars as suggested by Apple support), etc.) availed.
Despite the iPhone syncing normally with another Mac running the same version of macOS (and slightly better under a new user account on the affected MacBook Air - only new events would sync bidirectionally), the fix was ultimately to wait for then install iOS 16.3 and macOS 13.2 (thanks Dmitry!).
The updates also brought an end to the SyncServer (/System/Library/Frameworks/SyncServices.framework/Versions/A/Resources/SyncServer.app/Contents/MacOS/SyncServer) and Mingler (/System/Library/Frameworks/SyncServices.framework/Versions/A/Resources/SyncServer.app/Contents/Resources/Mingler) crash reports in Console ("EXC_BAD_ACCESS (SIGBUS)" and "EXC_GUARD (SIGKILL)", respectively).
/mac | Apr 08, 2018
After 14 years of calendar events (>17,000, but still well within the recommended limit of 50,000), Calendar.app finally started acting up; a month-long period refused to sync via iTunes from an iPhone to a Mac, despite desultory remedial efforts1.
Time to archive and cleanup:
Backup calendar(s) to both ICS and ICBU formats; print to PDF for good measure
Recover recalcitrant events from iPhone using iExplorer
Install icalBuddy2 version 1.8.10 via Homebrew3:brew install ical-buddy
Export all events from 2003 through 2017 using a for loop4:for i in {2003..2017}; do icalBuddy --separateByDate --noCalendarNames eventsFrom:$i-01-01 to:$i-12-31 > $i.txt; done
Combine all 2003–2017 txt files into one:awk 'FNR==1{print ""}1' *.txt > events.txt
Check for duplicates:uniq -d events.txt
and remove:uniq events.txt > events_deduped.txt
Remove auto-generated URLs for events created via iMessage or Mail:sed '/^\ \ \ \ url:/d' events_deduped.txt > events_urls_removed.txt
Delete 2003–2017 events from Calendar via Automator5: Find Calendar Events > Date ending > is before > 1/1/2018 > Delete Calendar Events6 (UPDATE: See macOS: Batch delete calendar events via Shortcuts.app)
Namely (and mainly from How To Reset Calendar, iTunes USB Sync):
deleting calendar caches (~/Library/Calendars/Calendar Cache*
and ~/Library/Caches/com.apple.iCal
)
deleting Calendar preference files (~/Library/Preferences/com.apple.iCal.plist
and ~/Library/Preferences/com.apple.iCal.helper.plist
)
resetting iTunes Calendar sync ( (no longer a thing since Mavericks apparently)$ /System/Library/Frameworks/SyncServices.framework/Versions/A/Resources/resetsync.pl full
)
importing events from the phone to the Mac via iExplorer and then overwriting the iPhone's calendar via iTunes
etc.
To avoid a bug in the officially-hosted version (1.8.8) under OS X 10.10+.
Exporting all events from 2003 through 2017 like so: $ icalBuddy --separateByDate --noCalendarNames eventsFrom:'jan 1, 2003' to:'december 31, 2017'
completed without error, but stopped in 2006, hence the for loop.
Calendar, Automator, and AppleScript were so recalcitrant under macOS Sierra that an OS X Mountain Lion virtual machine had to be employed for the cleanup process. More on deleting old events:
iCal: Highlight & delete all events or events within a date range
iCal: Delete all events before or after a certain date via AppleScript
AppleScript to clear the Apple Calendar cache - SolarWinds recently locked FixItScripts behind a paywall for their customers only; a request for access was denied. The referenced script is also sadly missing from Internet Archive's Wayback Machine.
Barney-15E's answer to How to erase all files of the Calendar?
Under macOS 10.14 Mojave, had to grant Full Disk Access to Automator (to prevent "The calendar is read only" error) and change the workflow slightly: Get Specified Calendar Items > Add > select calendar > Filter Calendar Items > Filter > events > Date ending > is before > 1/1/2019 > Delete Calendar Events > "If events are recurring, delete" > these events only.
jherran's sed script: events are not returned chronologically (or alphabetically, or in any discernible order)
Tried Calex based on its byline (The Calendar Exporter
), but it only exports to ICS (which Calendar.app does already). Further, it only exported a few hundred events before stopping.
iCalendar archiver "Tool to archive old iCalendar entries into files per year." Python script; ran successfully but resultant ICS file did not differ appreciably from the original.
Archiving via BusyCal: If you're still running Tiger or Leopard, iCal Archiver from the BusyCal team might help.
icsp: "Command-line iCalendar (.ics) to CSV utility. Pure bash, no dependencies."
/mac | Apr 01, 2018
/windows | Mar 22, 2018
Copying LibreOffice.app's 771.4MB (13,307 files) from LibreOffice_6.0.2_MacOS_x86-64.dmg (235.9MB) into /Applications took over three minutes* on a MacBook Pro with a SSD and 16GB of RAM via Finder (rsync and cp were similarly sluggish).
By way of comparison, Android Studio.app's 846.9MB (10,720 files) copied from android-studio-ide-162.3871768-mac.dmg (445.8MB) via Finder in just fifteen seconds.
However, after zipping LibreOffice.app via OS X's built-in Compress command, it could be unzipped in less than twenty seconds via the default handler (Archive Utility). Why is copying from the dmg file so much slower? Perhaps The Document Foundation could offer a zip file rather than (or in addition to) the sluggardly dmg.
* (On first launch, there was another thirty second delay while "Verifying 'LibreOffice.app'..."; clear the quarantine attribute beforehand to avoid: xattr -d com.apple.quarantine /Applications/LibreOffice.app)
Related:
Update:
/mac | Mar 05, 2018
Recently, a particularly recalcitrant website refused to fall to the usual suspects (Wget, SiteSucker, Offline Pages Pro, Chrome, Firefox, Safari, various extensions and add-ons, etc.), but incredibly came to heel under the venerable iCab's web archiving feature - thank you Alexander Clauss!
/mac | Feb 18, 2018
UPDATE: As of Mojave, Automator needs to be granted Full Disk Access in System Preferences > Security & Privacy > Privacy in order for Checksums to work correctly.
/mac | Feb 18, 2018
"Generally the best and simplest method is to reinstall OS X entirely. This is a neat way of triggering for a second time the process whereby the recovery partition is created. It's quite a drastic and time-consuming approach, however."and:
-- How to create a Mac recovery partition in OS X El Capitan and Yosemite
"The only way to solve this problem is to download the latest installer from App Store and re-install OS X"
-- How to re-create a missing recovery partition in OS X Yosemite (updated to OS X El Capitan)
However, thanks to davidjb's recovery.sh (detailed in his blog post Creating a macOS Recovery Partition without reinstalling OSX or re-running your installer), it is possible to add a recovery partition without reinstalling macOS.
Boot the Mac from an external drive or into Target Disk Mode*, then run:
TARGET="/Volumes/Macintosh HD" # Specify where to configure Recovery partition MACOS_INSTALLER="/Applications/Install macOS Sierra.app" # Path to your macOS installer # Remaining paths ahead are dependent on OS version # This *should* support 10.9 and above but is only tested on 10.12 curl http://support.apple.com/downloads/DL1464/en_US/RecoveryHDUpdate.dmg -L -o ~/Downloads/RecoveryHDUpdate.dmg hdiutil mount -nobrowse ~/Downloads/RecoveryHDUpdate.dmg pkgutil --expand /Volumes/Mac\ OS\ X\ Lion\ Recovery\ HD\ Update/RecoveryHDUpdate.pkg /tmp/recoveryupdate hdiutil mount -nobrowse "$MACOS_INSTALLER/Contents/SharedSupport/InstallESD.dmg" /tmp/recoveryupdate/RecoveryHDUpdate.pkg/Scripts/Tools/dmtest ensureRecoveryPartition "$TARGET" "/Volumes/OS X Install ESD/BaseSystem.dmg" 0 0 "/Volumes/OS X Install ESD/BaseSystem.chunklist" hdiutil eject "/Volumes/Mac OS X Lion Recovery HD Update" hdiutil eject "/Volumes/OS X Install ESD"
Notes:
/mac | Feb 14, 2018
However, ImageMagick works, well... magic: $ convert in.png -fill white -fuzz 80% +opaque "#000000" out.png
If the results aren't satisfactory, try tweaking the fuzz value (e.g., 20%). For multiple images, use a for loop: $ for i in *.png; do convert "$i" -fill white -fuzz 20% +opaque "#000000" "$i-out.png"; done
UPDATE 1: Converted a multi-page PDF to individual PNG images for processing via this Automator workflow (before discovering that the first convert command above works equally well on multipage PDFs):
UPDATE 2: Convert color PDF to black and white
/nix | Feb 02, 2018