The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,862 other subscribers

Archive for the ‘Apple’ Category

I wish I had known “How to rename multiple files at once on Mac | iMore” ages ago

Posted by jpluimers on 2022/01/04

Coming from a Windows and Linux background, I was used that mass renaming files was a non-stock feature and getting it right usually a pain in the butt.

How glad I was to find out [Wayback] How to rename multiple files at once on Mac | iMore

Believe it or not, it used to be a real pain to batch-rename files on Mac. Times have changed and so have the names of those 15 files.

Prior to OS X Yosemite, there was no simple way to rename multiple files at the same time on the Mac. Some people set up Automator rules. Others tried workarounds to rename files in third-party apps. Finally, Apple realized our heartache and created a much simpler way to rename multiple files at once, and it’s only gotten easier as macOS updates continue. Here’s how to batch-rename files on your Mac.

The only mass-rename I regularly need is fixing typos or OCR errors in filenames: this means replacing certain text with another piece of text.

That’s this easy:

Read the rest of this entry »

Posted in Apple, Mac OS X / OS X / MacOS, macOS 10.12 Sierra, macOS 10.13 High Sierra, OS X 10.10 Yosemite, OS X 10.11 El Capitan, Power User | Leave a Comment »

Upgrading drawio throug brew functions slightly different than one expects

Posted by jpluimers on 2021/12/31

TL;DR

This fails:

brew update drawio
brew upgrade drawio

This works:

brew cask upgrade drawio

Read the rest of this entry »

Posted in Apple, Cloud Apps, draw.io, Home brew / homebrew, Internet, Power User | Leave a Comment »

Getting the primary IP address (plain and CIDR) on Linux and OS X, then nmap scan on the associated subnet

Posted by jpluimers on 2021/12/13

The below answer works on my Linux and OS X systems (each having multiple network adapters configured):

[WayBack] bash – How to get the primary IP address of the local machine on Linux and OS X? – Stack Overflow

ip route get 1 | awk '{print $NF;exit}'

For Linux, I have this bash function:

# note the ";exit" lists the first default route interface, as there can be multiple
function nmap-fingerprint_network_of_default_interface() {
        default_if=$(ip route list | awk '/^default/ {print $5;exit}')
        default_if_cidr=$(ip -o -f inet addr show $default_if | awk '{print $4}')
        nmap -sP $default_if_cidr
}

And for OS X this one:

# requires ipcalc
function nmap-fingerprint_network_of_default_interface() {
        default_if=$(route -q -n get default | awk '/interface:/ {print $2;exit}')
        default_if_address=$(ifconfig $default_if | awk '/inet / {print $2;exit}')
        default_if_netmask_hex=$(ifconfig $default_if | awk '/inet / {print $4;exit}')
        default_if_network_bit_count=$(ipcalc --nocolor --class $default_if_address $default_if_netmask_hex)
        default_if_cidr=$(echo "$default_if_address/$default_if_network_bit_count")
        nmap -sP $default_if_cidr
}

These are the variables used:

  • default_if: network interface of the default route
  • default_if_cidr: IPv4 CIDR of the network interface of the default route (see Classless Inter-Domain Routing: CIDR notation – Wikipedia)
  • default_if_address: IPv4 address of network interface of the default route
  • default_if_netmask_hex: hexadecimal IPv4 network mask of network interface of the default route
  • default_if_network_bit_count: number of set bits in the IPv4 network mask of the network interface of the default route

Links used to get the above functions:

I might have gotten away with a pure bash solution (see [WayBack] Bash script for calculating network and broadcast addresses from ip and netmask or CIDR Notation · GitHub or my post Getting your local IPv4 addresses, netmasks and CIDRs), but the above works and is way shorter, and easier to maintain.

In stead of ipcalc, subnetcalc can do the same calculations and also supports IPv6, so that is something for a future try:

–jeroen

Posted in *nix, *nix-tools, Apple, bash, Color (software development), Development, Mac, Mac OS X / OS X / MacOS, Power User, Scripting, Software Development | Leave a Comment »

Apple retrocomputing link clearance

Posted by jpluimers on 2021/11/29

For my archive:

–jeroen

Posted in 68k, Apple, Classic Macintosh, History, Macintosh SE/30, Power User | Leave a Comment »

mail.google.com throwing ERR_CONNECTION_RESET and ERR_FAILED only on MacOS with Chrome (many versions)

Posted by jpluimers on 2021/11/22

This started somewhere towards the end of 2019, and the only solution that consistently is a full reboot.

Chrome (many versions) on MacOS High Sierra sometimes throws these errors only on https://mail.google.com:

Failing solutions:

  • close and open new tab
  • kill and restart chrome

Searches tried, but no results yet:

This was not the cause: [WayBack] 913220 – Broken Gmail sign in with Chrome 71 and “Block third-party cookies” enabled – chromium – An open-source project to help move the web forward. – Monorail

–jeroen

Posted in Apple, Mac OS X / OS X / MacOS, Power User | Leave a Comment »

How to Reclaim Purgeable Space on Mac – Bambielli’s Blog / Ask Different

Posted by jpluimers on 2021/10/22

For my link archive:

–jeroen

Read the rest of this entry »

Posted in Apple, Mac OS X / OS X / MacOS, Power User | Leave a Comment »

SwitchResX Configuration · GitHub: SwitchResX Settings for LG 21:9 UltraWide

Posted by jpluimers on 2021/10/11

[WayBack] SwitchResX Configuration · GitHub: SwitchResX Settings for LG 21:9 UltraWide

Works for other monitors, versions of MacOS/OS X/Mac OS and SwitchResX as well.

–jeroen

Posted in Apple, Mac OS X / OS X / MacOS, Power User | Leave a Comment »

Download macOS 10.4 Mojave .dmg

Posted by jpluimers on 2021/09/24

Hopefully one of these works:

–jeroen

Posted in Apple, Mac OS X / OS X / MacOS, Power User | Leave a Comment »

“This does not compute”: Mac SE/30 repair

Posted by jpluimers on 2021/09/21

A while ago, This does not compute had a few nice videos on a Mac SE/30 and it’s repair, including the recap process of replacing the electrolytic capacitors (or condensators in some other languages), and cleaning the board (some wash it with hot water and soap, others with isopropyl-alcohol, often called rubbing alcohol).

Note the simasimac can have many causes: bad capacitors in main board are the most common, but it can also be bad memory.

White lithium grease can make the floppy work again (see also [WayBack] Lithium soap – Wikipedia and [WayBack] Grease (lubricant) – Wikipedia).

He also added some links to which I added some quotes and WayBack links:

Notes

Desolder can be tricky, especially for surface mount. This helps:

  • Add some fresh 60/40 solder to the joints with a solder gun (as modern solder is lead free, whereas past solder contained lead)
  • Carefully heat up the component and surrounding area with a heat-gun

Choosing capacitors:

Soldering: always add some fresh solder on the pads before soldering surface mount (SMD) capacitors.

–jeroen

Read the rest of this entry »

Posted in 68k, Apple, Classic Macintosh, Development, Hardware Development, History, Macintosh SE/30, Power User, Soldering | Leave a Comment »

keyboard – How can I type unicode characters without using the mouse? – Ask Different

Posted by jpluimers on 2021/08/27

[WayBack] keyboard – How can I type unicode characters without using the mouse? – Ask Different (thanks [WayBack] malte):

  1. Press ⌃ Control+⌘ Command+ ␣ space to bring up the characters popover.
  2. Then type in the code point and press the down arrow to select the symbol. (Use U+#### as code point)
  3. Then simply press ENTER and you are done.

This also works with the names of the symbols (e.g. arrow).

Additional information

Note the icon in the top right of the character popover. It changes the popover to the full Character Viewer, which cannot be navigated by the keyboard. Click the icon in the top right of the Character Viewer to return to the popover. Many thanks to @Tom Gewecke for this information.

–jeroen

Posted in Apple, Mac OS X / OS X / MacOS, Power User | Leave a Comment »