"Be passerby." #

The world is a bridge; pass over it, but build no houses upon it.

Attributed to Jesus on the Buland Darwaza

What is contentment? To renounce all craving for what is not obtained unsought and to be satisfied with what comes unsought, without being elated or depressed even by them—this is contentment. As long as one is not satisfied in the self, he will be subjected to sorrow. With the rise of contentment the purity of one's heart blooms. The contented man who possesses nothing owns the world.

Vasiṣṭha's Yoga

Jesus said, "Be passersby."

The Gospel of Thomas, Logion 42

/misc | Dec 08, 2024

Prevent editing of form field data by flattening PDFs in Adobe Acrobat #

Adobe's 8-step guide on How to flatten a PDF file ends with the instruction to "Print document"; sadly, this feature is missing in the macOS version:

Here's a 3-step alternative:

  1. Tools → Print Production → Preflight (or use the keyboard shortcut Cmd+Shift+X to save a few clicks)

  2. In PDF Fixups, double-click Flatten annotations and form fields

  3. Save the new PDF when prompted

and similarly-concise console approach:

  1. Press Cmd+J to open the JavaScript Debugger console

  2. Enter this.flattenPages(); and press Cmd+Return

  3. Save the PDF as desired

Notes

/mac | Oct 18, 2024

Free, offline watermark removal #

with IOPaint's erase models:

  1. Install: pip3 install iopaint (see Quick Start for GPU instructions)

  2. Run: iopaint start --model=lama --device=cpu --port=8080

  3. Access: open http://localhost:8080 in your web browser

Removing watermarks from image via IOPaint
Seated Buddha, courtesy of The Cleveland Museum of Art

Besides watermark/object removal, IOPaint also supports inpainting, outpainting, paint-by-example, and text generation.

Related

/nix | Sep 28, 2024

One-click DFU mode #

Twocanoes (developer of Winclone) has updated DFU Blaster Pro, which reduces the process of entering DFU mode on a Mac to a single click. After connecting to the target Mac's DFU port, simply press the "DFU Mode" button on the host Mac. The tool can also retrieve the target Mac's model type, serial number, and ECID.

/mac | Sep 25, 2024

Disable Sequoia's monthly screen recording permission prompt #

See update below for important change in macOS 15.1.

The widely-reported "foo is requesting to bypass the system private window picker and directly access your screen and audio" prompt in Sequoia (which Apple has moved from daily to weekly to monthly (though for some apparently it is minute-by-minute)) can be disabled by quitting the app, setting the system date far into the future, opening and using the affected app to trigger the nag, clicking "Allow For One Month", then restoring the correct date.

Tested by setting the date to 1/1/2040 then clicking "Allow For One Month"; no amount of changing to dates before 1/1/2040 triggered the nag, while setting the date to a month after 1/1/2040 or anytime thereafter triggered it again.

Apple's latest security enhancement defeated by a "hack" from the '90s shareware scene?

requesting to bypass the system private window picker and directly access your screen and audio

Updates

/mac | Sep 18, 2024

Delete all Dropbox shared links #

via JavaScript:

// This script automates the removal of all shared links from your Dropbox account. 
// Navigate to https://www.dropbox.com/share/links, open the browser console, and paste the JavaScript code below.
// Optional: To delete only specific types of links (i.e., View or Edit links), 
// edit the `deleteLinkTexts` array to include only the types of links you want to remove.
// By default, the script will target both "Delete view link" and "Delete edit link" options.
// Script source: https://www.dropboxforum.com/t5/Create-upload-and-share/remove-all-shared-links/m-p/710562/highlight/true#M73731

async function pause(ms) {
    return new Promise(resolve => {
        setTimeout(() => {
            resolve();
        }, ms);
    });
}

async function deleteLinks() {
    const deleteLinkTexts = ["Delete view link", "Delete edit link"]; // Both options
    let items = document.querySelectorAll('.share-page-row-actions [data-testid="open-menu-button"]');

    for (let i = 0; i < items.length; i++) {
        items[i].click(); // Click the submenu button to open the menu
        await pause(1000); // Adjust the pause duration as needed

        // Find and click the appropriate delete link option
        const deleteLinkOption = Array.from(document.querySelectorAll('.dig-Menu-row-title')).find(item => deleteLinkTexts.includes(item.textContent));
        if (deleteLinkOption) {
            deleteLinkOption.click(); // Click the delete link option
            await pause(1000); // Adjust the pause duration as needed

            // Find and click the delete button
            const deleteButton = document.getElementsByClassName("dbmodal-button");
            if (deleteButton.length > 0) {
                deleteButton[0].click();
                await pause(1000); // Adjust the pause duration as needed
            }
        }

        items = document.querySelectorAll('.share-page-row-actions [data-testid="open-menu-button"]'); // Refresh items
    }
}

deleteLinks();

or via watermint toolbox:

  1. Install watermint toolbox

  2. List shared links:

    % tbx dropbox file sharedlink list
    ...  
    | tag    | url                        | name    | expires | path_lower      | visibility |
    |--------|----------------------------|---------|---------|-----------------|------------|
    | file   | https://www.dropbox.com... | foo.jpg |         | /photos/foo.jpg | public     |
    | file   | https://www.dropbox.com... | bar.jpg |         | /photos/bar.jpg | public     |
    | folder | https://www.dropbox.com... | Baz     |         | /baz            | public     |
    
    The report generated: /Users/user/.toolbox/jobs/20240913-094617.OPY/report/shared_link.csv
    The report generated: /Users/user/.toolbox/jobs/20240913-094617.OPY/report/shared_link.json
    The report generated: /Users/user/.toolbox/jobs/20240913-094617.OPY/report/shared_link.xlsx
    The command finished: 2.16s
  3. Delete a single shared link:

    % tbx dropbox file sharedlink delete -path /photos/foo.jpg
    
    Removing link `https://www.dropbox.com...` that point to `/photos/foo.jpg`
    
    | status  | reason | input.tag | input.url                  | input.name | input.expires | input.path_lower | input.visibility | result |
    |---------|--------|-----------|----------------------------|------------|---------------|------------------|------------------|--------|
    | Success |        | file      | https://www.dropbox.com... | foo.jpg    |               | /photos/foo.jpg  | public           |        |
    ...

    or all shared links by extracting the paths from the path_lower column in shared_link.csv with awk and feeding them to tbx via xargs:

    % awk -F ',' 'NR>1 {print $5}' shared_link.csv | xargs -I {} tbx dropbox file sharedlink delete -path "{}"

    (tbx includes a dropbox team sharedlink delete links command to batch delete shared links for Teams accounts.)

Related

/misc | Sep 14, 2024

macOS: Capture app window screenshot with drop-down menu and cursor after a delay #

Tried the native Screenshot.app, Shottr, CleanShot X, Flameshot, ksnip, Skitch, Xnapper, among others to no avail.

Snagit 2024's Capture Multiple Areas on the Screen did the trick:

  1. In the Capture window, select the All-in-One tab (rather than the usual Image for screenshots)

  2. Enable Capture Cursor and 5 Second Delay:

    Snagit 2024 Capture window

  3. Click the Capture button or press Control+Shift+C

  4. When the orange crosshairs appear, position your cursor over the main application window and click to capture it, including any context menus, drop-downs, or other elements that appear within the frame

  5. Click the camera icon in the popup menu to edit or save the screenshot

/mac | Sep 08, 2024

UTM: Add removable disk to HVF-based macOS guest VM #

(Spent way too much time in UTM's Drives → New… and mucking about in config.plist before this brain-wave):

  1. Create a new blank image in Disk Utility (Cmd+N)

  2. Set filename, size, format, etc. as desired

  3. Select the VM in UTM's sidebar → click the "Edit selected VM" button in the toolbar

  4. Under "Drives" click New… → check "Removable" → click "Create" then "Save" to close the settings window

  5. In the VM's main pane, scroll down to the "External Drive" dropdown menu (which has now appeared) → select Browse… → double click the DMG file created in step 2

/mac | Sep 07, 2024

Remote Desktop: Enable concurrent interactive and remote sessions #

(without hack workarounds) via RDP shadowing.

Warning: Do not proceed without fully understanding the steps involved and how to secure your network.

1. On Windows 10 Professional ("server")

  1. System Properties (sysdm.cpl) → Remote

  2. Enable "Allow remote connections to this computer" → OK

  3. Group Policy Editor (gpedit.msc) → Local Computer Policy → Computer Configuration → Administrative Templates → Windows Components → Remote Desktop Services → Remote Desktop Session Host → Connections

  4. Double click "Set rules for remote control of Remote Desktop Services user sessions" → select "Enabled" → set "Options:" to "Full Control without user's permission" → OK

  5. Windows Defender Firewall with Advanced Security (wf.msc) → check "File and Printer Sharing (SMB-In)" and "Remote Desktop - Shadow (TCP-In)" are enabled for LAN connections (see Restrict Windows Remote Desktop connections to LAN only)

2. On Windows 11 Home ("client")

  1. If the local and remote credentials differ, store the remote username and password in Windows Credential Manager:

    cmdkey /add:<hostname|IP> /user:<remote_user> /pass:<remote_pass>

2a. Manual method

  1. Retrieve the remote user's session ID (will generally be "1" or "2" on single-user systems):

    qwinsta /server:<hostname|IP>

  2. Connect:

    mstsc.exe /shadow:<sessionID> /v:<hostname|IP> /noconsentprompt /control

2b. Automatic method

  1. Modify and save this batch file, then run it to automatically retrieve the user session ID and establish a connection:

    @echo off
    setlocal enabledelayedexpansion
    
    :: Set your remote username and hostname or IP address
    set remote_user=<USERNAME>
    set remote_host=<HOSTNAME|IP>
    
    :: Get the session ID for the specified username where the session state is Active
    for /f "tokens=2,3,4" %%a in ('qwinsta /server:%remote_host% ^| findstr /R "^ %remote_user%"') do (
        if "%%c"=="Active" (
            set session_id=%%b
        )
    )
    
    :: If an active session ID was found for the specified user, connect automatically
    if defined session_id (
        start "" mstsc /v:%remote_host% /shadow:%session_id% /control /noConsentPrompt
    ) else (
        echo No active session found for user "%remote_user%".
    )
    
    exit

3. Notes

4. Further reading

/windows | Sep 04, 2024

Restrict TightVNC connections to LAN only #

  1. TightVNC Service Configuration → Access Control

  2. Click Add… → set "First matching" and "Last matching IP" values to cover desired LAN range (e.g., 192.168.0.1 and 192.168.0.254) → set "Action" to Allow → click OK

  3. Click Add… → set "First matching" to 0.0.0.0 and "Last matching IP" to 255.255.255.255 → set "Action" to Deny → click OK

  4. Click Apply

  5. Optionally adjust local and remote IP address scope for TightVNC's default inbound rule in Windows Defender Firewall with Advanced Security; see Restrict Windows Remote Desktop connections to LAN only.

/windows | Aug 31, 2024

Restrict Windows Remote Desktop connections to LAN only #

  1. Open Windows Defender Firewall with Advanced Security (Win+R → wf.msc → Enter)

  2. Click "Inbound Rules" under "Windows Defender Firewall with Advanced Security on Local Computer"

  3. For each Remote Desktop entry, double click to open Properties then select the "Scope" tab

  4. Under "Remote IP address" select "These IP addresses:"

  5. Click Add…

  6. Select "Predefined set of computers", choose "Local subnet", then click OK twice

Thanks to @void_in for the pointer.

/windows | Aug 31, 2024

Burning ISO images to CD or DVD on a Mac in 2024 #

Although disc burning was removed from Disk Utility in OS X 10.11 El Capitan, two native methods and a venerable open-source app still work even in macOS Sonoma:

/mac | Aug 30, 2024

Separate vocal & instrumental tracks #

with Demucs, an open source "state-of-the-art music source separation model, currently capable of separating drums, bass, and vocals from the rest of the accompaniment."

  1. Install: pip3 install demucs soundfile

  2. Run: /path/to/demucs --two-stems=vocals --out=/path/to/output_dir/ /path/to/audio.flac

  3. Listen: Find vocals.wav & no_vocals.wav inside output_dir/audio/.

Notes

/mac | Aug 28, 2024

Installing exFAT for FUSE on Apple silicon #

My meager guide to mounting exFAT partitions with unsupported cluster sizes in macOS clearly needed a dollop of detail. The following steps were tested in macOS 14.6.1 with macFUSE 4.8.0 and exFAT 1.4.0:

1. Enable kernel extensions

(Though required as of Sonoma, Sequoia's FSKit (which implements a file system in user space) may render this unnecessary. In the meantime, Apple warns: "Kexts are no longer recommended for macOS. Kexts risk the integrity and reliability of the operating system. Users should prefer solutions that don’t require extending the kernel and use system extensions instead.")

  1. Start up in macOS Recovery

  2. Click Options → Continue Utilities → Startup Security Utility → Security Policy...

  3. Change from "Full Security" to "Reduced Security" → enable "Allow user management of kernel extensions from identified developers" → click OK → enter password → click OK → Restart

2. Install macFUSE

  1. Download and run the PKG installer (Universal binary that supports macOS 10.9 through 14(!))

  2. When "System Extension Blocked" appears, click "Open System Settings"

  3. Click "Allow" under "System software from developer 'Benjamin Fleischer' was blocked from loading." → enter password twice when prompted → click "Restart"

3. Install Homebrew

  1. /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

4. Install autoconf, automake, & pkg-config

  1. brew install autoconf automake pkg-config

5. Download and compile exFAT for FUSE

  1. git clone https://github.com/relan/exfat.git && cd exfat && autoreconf --install && ./configure && make

  2. While installing to /usr/local/sbin/ is possible via sudo make install, running from the fuse subdirectory after compiling is fine, e.g., sudo ./fuse/mount.exfat-fuse /dev/disk2s2 ~/mnt

6. Removal

  1. exFAT for FUSE: If you opted to install in step 5.2, run sudo make uninstall from the exfat directory. Otherwise, simply delete the exfat directory created in step 5.1.

  2. Homebrew:

    1. Uninstall packages installed via brew: brew list | xargs brew uninstall --force

    2. Clean up any remaining files: brew cleanup --prune=all

    3. Uninstall Homebrew: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"

    4. If you ran (echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/yourusername/.zprofile and eval "$(/opt/homebrew/bin/brew shellenv)" as instructed after the Homebrew installation completed, you may also want to remove eval "$(/opt/homebrew/bin/brew shellenv)" from ~/.zprofile or simply delete ~/.zprofile altogether if there are no other lines in it.

  3. macFUSE: Run /Extras/Uninstaller.app from the mounted DMG.

  4. Security Settings: Repeat steps 1.1 & 1.2, then switch "Reduced Security" back to "Full Security".

Notes

/mac | Aug 10, 2024

Windows freeware for annotating PDFs without watermark nags #

Windows lacks an equivalent to macOS's Preview app, but these free tools can handle simple PDF markup tasks:

Microsoft Edge

Mozilla Firefox (H/T: éric)

Foxit PDF Reader

Okular

PDF24 Creator (H/T: éric)

/windows | Jul 10, 2024

New keyboard App Shortcuts for Messages not working in Sonoma #

Spent far too long trying to troubleshoot a new App Shortcut for Messages with commands like defaults find NSUserKeyEquivalents and mucking about with files such as com.apple.MobileSMS and .GlobalPreferences.plist before stumbling onto App Keyboard Shortcuts Don't Work in Sonoma. Newly-added App Shortcuts in Sonoma do not work for Messages.app; other tested apps (Calendar, Contacts, Dictionary) appear unaffected.

As jamesfromhaymarket points out, one workaround is to set the desired keyboard shortcut for All Applications instead of just Messages; assigning "Delete Conversation…" (press Opt+; for the ellipsis) to Cmd+D this way was successful.

/mac | Jun 23, 2024

Pause & highlight players in sports reels #

  1. Launch ActivePresenter 9 (free for trial and non-commercial use; watermark-free output)

  2. Click Open → select desired video

  3. Click on the time axis to reveal the playhead then drag it to the desired location

  4. Click the "Insert Time" icon on the timeline toolbar → enter desired duration (default is 2000 ms) → OK

  5. Click the Insert tab → Spotlight → use the crosshairs cursor in the video player to highlight the desired athlete

  6. Adjust the spotlight in the timeline by clicking and dragging its box or outer edges

  7. Optionally slow down or speed up frames:

    1. Define a range by clicking and dragging the green start marker and/or orange end marker on either side of the playhead
    2. Click the "Change Playback Speed" icon in the timeline toolbar
    3. Enter desired playback speed percentage (default is 200) → OK
    4. Double click anywhere on the time axis to clear the selection

ActivePresenter video timeline toolbar
Click to enlarge

Related

Sources

/misc | Jun 15, 2024

Batch concatenate MP4 videos with fade in/out transitions #

  1. Install MoviePy (pip3 install moviepy) and ffmpeg

  2. Edit Python script below, adjusting fade_duration and input_folder as desired, then save (e.g., combine_videos.py):

    import os
    from moviepy.editor import VideoFileClip, concatenate_videoclips
    
    def add_fade_effects(clips, duration=2):
        faded_clips = []
        for i, clip in enumerate(clips):
            if i != 0:
                clip = clip.set_start(clips[i-1].end)
                clip = clip.crossfadein(duration)
            clip = clip.fadein(duration).fadeout(duration)  # Apply fade-in and fade-out to each clip
            faded_clips.append(clip)
        return faded_clips
    
    def combine_videos_with_fades(input_folder, output_file, fade_duration=0.5):
        video_files = [os.path.join(input_folder, f) for f in sorted(os.listdir(input_folder)) if f.endswith('.mp4')]
        video_clips = [VideoFileClip(video) for video in video_files]
        video_clips = add_fade_effects(video_clips, fade_duration)
        final_clip = concatenate_videoclips(video_clips, method="compose")
        final_clip.write_videofile(output_file, codec="libx264")
    
    if __name__ == "__main__":
        input_folder = "/path/to/mp4s"  # Replace with the path to your folder containing MP4 files
        output_file = "combined_video_with_fades.mp4"
        combine_videos_with_fades(input_folder, output_file)
  3. Run python3 combine_videos.py

/nix | Jun 15, 2024

Highlight & auto-track player motion in sports reels #

  1. Launch PLAY by Metrica Sports1 → click "New Workspace" → enter desired name for workspace → Save

  2. Click plus symbol under PLAYLISTS2 → enter desired name for playlist (e.g., "Goals")

  3. Hover over the Goals playlist → click three dots at bottom right of playlist entry → click "Add video file as a clip..." → select desired video clip(s)

  4. Click the dropdown arrow under Goals → click and drag video clips to order as desired

  5. Select a video clip in Goals → open the Annotations Module by clicking the crossed pencil and ruler icon (or using the keyboard shortcut, Cmd+5)

  6. Click the large blue button with the white plus symbol → Player Visualizations → select an effect (Spotlight, Ring, Magnifier, etc.)3 → select desired player → click Player Tracking4 button5

  7. When finished, hover over the Goals playlist → click three dots at bottom right → click "Export Playlist as Video..." → check "Annotations" and optionally "Export all clips as a single video file" → browse to desired destination → click Export

Pause and highlight

If tracking proves too tedious, pause and highlight instead:

  1. In step 6 above, rather than "Player Visualizations", click "Pause & Drawings"

  2. Set desired Pause Duration (default is 5 seconds)

  3. Click desired highlighting option:

Remove clips from playlist

  1. Highlight unwanted clip(s)

  2. Hover over playlist name

  3. Click three dots at lower right of playlist

  4. Click "Delete Clips"

Related

Footnotes

  1. Worth skimming their tutorial beforehand. 

  2. For importing long videos instead of clips, click the plus symbol under VIDEO MANAGER. 

  3. On very brief segments, the exported annotations/effects can start later and linger longer than expected, despite attempts to adjust their duration beforehand. 

  4. Only available in the paid LITE plan or higher, though a 7-day free trial (sans credit card) is available (exported videos display a smallish "PLAY by METRICA SPORTS" watermark in the bottom right corner) 

  5. Depending on video quality, amount of motion, etc., you may need to backtrack a few frames, manually reposition the visualization, and click "Player Tracking" repeatedly. The keyboard shortcuts come in handy during this process, especially Cmd+Alt+left or right arrow to move 1 frame backwards or forwards, and Shift+Space to start/stop Player Tracking. 

/misc | Jun 14, 2024

Disable Win key in Windows #

Because switching between Windows VMs and their macOS host via Cmd+Tab launches the Start menu every time and PowerToys Keyboard Manager utility only works sporadically.

  1. Open HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout

  2. Create a new binary value named Scancode Map and assign value data of 00 00 00 00 00 00 00 00 03 00 00 00 00 00 5B E0 00 00 5C E0 00 00 00 00

  3. Reboot

Notes

/windows | Jun 12, 2024

Access iCloud in macOS guest virtual machines #

starting in macOS 15:

Updates

H/T

/mac | Jun 10, 2024

Pleasure, happiness, and marriage #

"They say...that the aim of the ignorant is pleasure; the pursuit of the wise, happiness. Pray, under which category would you class marriage? I suppose it comes under one or the other."

...

"Both," I answered. "Could you see the ideal woman as I would fain paint her to you, you would understand me better. The pleasure you enjoy in the society of a noble and beautiful woman should be but the refreshment by the wayside as you journey through life together. The day will come when she will be beautiful no longer, only noble and good, and true to you as to herself; and then, if pleasure has been to you what it should be, you will find that in the happiness attained it is no longer counted, or needed, or thought of. It will have served its end, as the crib holds the ship in her place while she is building; and when your white-winged vessel has smoothly glided off into the great ocean of happiness, the crib and the stocks and the artificial supports will fall to pieces and be forgotten for ever. Yet have they had a purpose, and have borne a very important part in the life of your ship."

Francis Marion Crawford in Mr. Isaacs: A Tale of Modern India

Calls to mind u/lucky_ducker's 2016 comment and Rufus' reflections on the fruit of action.

/misc | Jun 05, 2024

Add M4R ringtone to iPhone without a PC, Mac, or third-party app #

Repeating an answer here for posterity that I made earlier today on AskDifferent:

The only native method I've found for iOS 17 (that does not require using a Mac or PC) is via GarageBand:

  1. Save M4R to Files
  2. Open GarageBand and tap the + icon
  3. Scroll Audio Recorder and tap Voice
  4. Tap the Tracks view icon (looks kind of like an I Ching hexagram) at top left
  5. Tap the Loops icon (looks like a loop of string) at top right
  6. Tap on the Files tab at top center then tap "Browse items from the Files app"
  7. Tap your M4R file in Recents (tap Browse to locate it if it's not in Recents)
  8. Tap and start dragging the M4R filename, which will bring the Track view back up - drop the M4R at the top left corner
  9. Tap the metronome icon to turn it off
  10. Optional: Tap the + symbol at the top right corner, tap Section A, uncheck Automatic, and set length as desired
  11. Tap the drop-down arrow at top left, then tap My Songs
  12. Tap and hold the project you just created, tap Share, tap Ringtone, enter desired name, then tap Export.
  13. When "Ringtone Export Successful" appears, you'll have the option to tap "Use sound as..." then select "Standard Ringtone", "Standard Text Tone", or "Assign to contact".

If anyone knows of a more elegant native method for importing an M4R ringtone without a Mac or PC, please share. One might be forgiven for imagining that Apple intentionally keeps the process abstruse to encourage ringtone sales through the iTunes Store.

/misc | May 25, 2024

Rare addition to the macOS app page #

A breath of fresh air in this age of IAPs, subscriptions, and multi-gig downloads:

Free Ruler 2.0.8 [608k] {S} Floating horizontal and vertical screen rulers with measurements in pixels, inches, or millimeters. Available on both the Mac App Store and GitHub. 📺

/mac | May 25, 2024

Adding a subdomain to a NearlyFreeSpeech-hosted domain #

Unlike some cPanel-based shared hosting platforms that allow mapping subdomains to subdirectories, NearlyFreeSpeech.NET requires a new site setup for each subdomain. However, multiple aliases can be created for a single site. For example, both foo.example.com and bar.example.com can point to shortname.nfshost.com with the hostname example.com.

These steps outline how to create a new subdomain for an NFS-hosted domain with an external DNS host:

At NFS:

  1. NFS Member Login → sites → under "Actions", click "Create a New Site" (even if your domain is already hosted with them).

  2. Select your NFS account from the dropdown menu → assign a unique "Site Short Name" (which serves as a unique identifier for the subdomain within the NFS system).

  3. Enter desired subdomain URL (e.g., docs.example.com) into Canonical Name field.

  4. Click No for "Set up DNS for new domains?" → Next.

  5. Select desired Server Type → Next.

  6. Select desired Site Plan → Finish.

  7. Verify the site details on the summary page → click Create This Site.

  8. When "Success! Everything looks OK, though it will take a minute or two to finish setting up." appears, click Continue.

At your DNS host:

  1. Create a new CNAME record, setting the host to your subdomain and the address to your shortname.nfshost.com (replace shortname with your site's NFS short name).

Links

/misc | May 25, 2024

Batch convert Outlook MSG to EML or MBOX #

with Matijs van Zuijlen's open source MSGConvert (aka Email::Outlook::Message).

Install:

sudo apt install libemail-outlook-message-perl

Recursively convert MSG files to EML files, saving in their respective directories:

find /path/to/msgs/ -iname "*.msg" -type f -print0 | xargs -0 -I{} bash -c 'msgconvert "{}" -o "$(dirname "{}")/$(basename "{}" .msg).eml"'

Recursively convert and combine MSG files into a single MBOX file:

find /path/to/msgs/ -iname "*.msg" -type f -print0 | xargs -0 msgconvert --mbox combined.mbox

Notes

/nix | May 24, 2024

Losslessly extract audio from DVD, ISO, or VIDEO_TS #

1. DVD Audio Extractor 8.6.0 (shareware, 30 day trial)

By far the easiest, while also offering the most options. Slight hitch on ARM when attempting to run the installer, dvdaudioextractor.exe:

This program can only be installed on versions of Windows designed for the following processor architectures: x64

Worked around by extracting the contents via innoextract, then running .\app\dvdae-gui.exe.

2. ffmpeg 7 (free & open source)

FFmpeg 7 has recently merged dvdvideo, a "DVD-Video demuxer powered by libdvdnav and libdvdread" which

"can directly ingest DVD titles, specifically sequential PGCs, into a conversion pipeline. Menu assets, such as background video or audio, can also be demuxed given the menu’s coordinates (at best effort). Seeking is not supported at this time. Block devices (DVD drives), ISO files, and directory structures are accepted. Activate with -f dvdvideo in front of one of these inputs."

While the documentation includes four examples, it took some tweaking to find the right combination for losslessly extracting audio from a DVD in drive d:\ to WAV:

ffmpeg -f dvdvideo -title 2 -i d: -vn -acodec pcm_s16le -ar 48000 -ac 2 output.wav

and Apple Lossless (ALAC):

ffmpeg -f dvdvideo -title 2 -i d: -vn -acodec alac -ar 48000 -ac 2 output.m4a

(Found the correct title number via VLC (Playback → Title) and the audio format and bitrate via ffmpeg -i D:\VIDEO_TS\VTS_01_1.VOB: Stream #0:2[0xa0]: Audio: pcm_dvd, 48000 Hz, stereo, s16, 1536 kb/s.)

Building FFmpeg is a little tricky, but nightly builds linked from ffmpeg.org are available.

3. DVD Audio Extraction

A 17-year-old, multi-step method leveraging DVD Shrink, vStrip GUI, and DB PowerAmp Music Converter.

/windows | May 21, 2024

Delete content cropped from PDFs in Preview #

Cropping PDFs in Preview merely hides content (rather than erasing it) as explained in the alert dialog:

Cropping a PDF document doesn’t delete the content outside the selection.

The content outside the selection is hidden in Preview, but you might be able to view it in other applications.

Mac OS X 10.6.8 Snow Leopard’s Preview 5.0.3 (504.1) was the last version to support viewing the hidden data, as shown in its very different alert dialog:1

Cropping a document doesn’t destroy its contents.

You can view the uncropped document by choosing View > PDF Display > Media Box

Happily, Skim can do what modern versions of Preview cannot, revealing hidden content outside of the crop box: click PDF in the app menu → PDF Display → toggle Crop Box to Media Box.2

To permanently eliminate cropped content and adjust the PDF dimensions, execute the following Ghostscript command after cropping and saving in Preview:

gs -sDEVICE=pdfwrite -dUseCropBox -o output.pdf input.pdf

then verify in Skim as above.

Ghostscript can be built and installed from source (./configure && make && make install), downloaded as a PKG installer from MacTeX, or installed via brew install ghostscript .

Related

Footnotes

  1. A retrospective look at Mac OS X Snow Leopard | HN

  2. Skim sports a slew of awesome features, including a real dark mode (that applies to content as well as the interface) and the ability to integrate with LaTeX.

/mac | May 16, 2024

Dell WWAN card not recognized or detected #

A newly-installed Dell Mobile Broadband (WWAN) module was not detected in Windows Device Manager (even under hidden devices) despite "WWAN/GPS" being enabled in BIOS Setup → Connection.

u/Dan-in-Va's reddit comment contained the solution:

I disconnected the battery and removed the card, reseated it, reconnected the four antenna cable pins, reconnected the battery, and powered back on. It was immediately recognized. I re-ran the firmware/driver update which worked, where the driver applied on the subsequent reboot.

(The only modification made was to press and hold the power button for some seconds after disconnecting the battery to discharge capacitors (of course, be sure the power cord is unplugged as well).)

The WWAN card appeared in Device Manager under "Other devices" as "PCI Device". Clicked "Update Driver..." and pointed to the directory containing the extracted Dell Wireless 5823e and Intel L860-R LTE Firmware and GNSS Driver; it then appeared under "System devices" as "DW5823e Intel(R) XMM7560 R+ LTE-A UDE Device".

The module disappeared once more after several power cycles, but reappeared after running Windows update and rebooting; the message "Configuring mobile broadband device | Do not shut down or restart Windows." displayed just above the Notification area briefly.

Notes

/windows | May 10, 2024

Inno Setup installer unpackers #

Inno Setup is "a free installer for Windows programs by Jordan Russell and Martijn Laan, [f]irst introduced in 1997". Resources like EXEs and DLLs can be liberated from these archives via:

/windows | Apr 07, 2024

iOS: Timer/stopwatch app that displays cumulative running total per task #

while also tracking each individual session with optional notes:

Timemator (30-day trial, then $7.99 one-time purchase) by Gleb Kotov/Catforce Studio

Timemator

/misc | Mar 27, 2024

Thunderbird: Hide Header Pane and Buttons in Message Pane #

When the Thunderbird Message Pane is enabled (View → Layout → Message Pane), the Header Pane and Buttons (Reply, Forward, Delete, etc.) take up an inordinate amount of space; here's how to hide them:

  1. In Config Editor, set toolkit.legacyUserProfileCustomizations.stylesheets to true

  2. Help → Troubleshooting Information → open Profile Folder

  3. In the profile folder, open or create "chrome" directory

  4. Edit or create "userChrome.css" inside of "chrome", adding this line:
    .main-header-area {display:none !important;}

  5. Restart Thunderbird

On a related note, alternating row colors in the Message List pane can be enabled by adding the following to userChrome.css:

table[is="tree-view-table"] tr:nth-child(even):not(.selected):not(tr:hover) { 
      -moz-appearance: none !important; 
      background-color: rgb(240,240,240) !important;
      }

/misc | Mar 02, 2024

Migrating from Netlify to Cloudflare Pages #

After almost 5 years of hosting at Netlify (at $9/month for basic, anonymized analytics), just moved to Cloudflare Pages after reading this r/webdev post:

Netlify just sent me a $104K bill for a simple static site

along with the related HN comments.

The previous server migration, from Slicehost/Rackspace to Netlify, had been largely to avoid just such unlimited billing exposure.

Notes

Related

/misc | Feb 26, 2024

Firefox: Download all images on page, #

no extension necessary: Tools → Page Info → Media → Select All → Save As...

/misc | Feb 25, 2024

Enable guest WiFi without hotspot portal landing page in UniFi Network Application 8.0.26 #

Tested on a UniFi Express, which comes with a preset IP address of 192.168.1.1. Note that the Express is limited to managing 5 UniFi devices, including itself.

1. Create VLAN

  1. Go to Networks: https://192.168.1.1/network/default/settings/networks

  2. Click "New Virtual Network"

  3. Set Network Name and Gateway IP/Subnet as desired

  4. Next to "Advanced" click "Manual"

  5. Set VLAN ID as desired

  6. Check "Network" next to "Isolation" → click "Add"

2. Create guest WiFi network

  1. Go to WiFi: https://192.168.1.1/network/default/settings/wifi

  2. Click "Create New"

  3. Set Name and Password as desired, and set Network to VLAN created above.

  4. Optionally enable "Client Device Isolation" under Advanced → Manual

  5. Click "Add WiFi Network"

3. Disable hotspot landing page

  1. Go to Landing Page settings: https://192.168.1.1/network/default/hotspot/portal → "Settings" (This page was not discoverable via "Search Settings" using the terms "landing", "hotspot", "portal", or "guest".)

  2. Under "Landing Page Settings", uncheck "Show Landing Page" → click "Save"

/misc | Jan 20, 2024


Subscribe or visit the archives.