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 recently learned about the MacOS universal Shift-Option-Command-V keyboard shortcut: paste without formatting

Posted by jpluimers on 2023/09/19

Boy, two extra modifier keys: [Wayback/Archive] How to Strip Formatting When You Copy and Paste Text: 5 Ways

To paste as plain text on a Mac, you can use the somewhat cumbersome shortcut Option+Cmd+Shift+V to paste without formatting. This is a system-wide shortcut, so unlike Windows, it should work everywhere. Technically, the shortcuts pastes and matches the formatting, but this has the same effect of removing the original formatting.

Via [Wayback/Archive] macos word microsoft office paste without formatting – Google Search.

Paste without formatting is an issue on Windows as well. The default should be “paste without formatting” instead of the current “paste with source formatting”. See for instance these tweets:

Read the rest of this entry »

Posted in Apple, Classic editor, Development, Gutenberg editor, Mac OS X / OS X / MacOS, Office, Office 2011 for Mac, Power User, Software Development, Web Development, WordPress | Leave a Comment »

New in box: Super Serial Card – Apple Computer

Posted by jpluimers on 2023/07/24

Still need to test this out, but I got a new in box “Super Serial Card – Apple Computer

Details: Apple II serial cards – Wikipedia

Apple Computer’s Super Serial Card, sometimes abbreviated as “SSC”, is the most well known communication card made for the Apple II. Apple called it “Super” because it was able to function as both of Apple’s previous cards, the Apple II Communications Card for modem use and the Apple II Serial Interface Card for printer use. A jumper block was used to configure the card for each of the two modes. The card has a maximum speed of 19,200 bit/s and is compatible with both ROM revisions of the Apple II Serial Interface Card. Reliable communications at 9600 bit/s and higher required disabling of interrupts. The card can actually run at 115,200 bit/s as well, using undocumented register settings; but speeds between 19,200 and 115,200 are not possible using this technique. The Super Serial Card was released in 1981 and utilizes the MOS Technology 6551 ACIA serial communications chip.

Manual: [Wayback] a2_Super_Serial_Card_user’s_manual.pdf via [Wayback/Archive.is] Apple II Super Serial Card – Google Search

Image:

Read the rest of this entry »

Posted in //e, Apple, Apple ][, History, Power User | Leave a Comment »

how do I merge the tabs of two open Preview windows if I have more than two open? – Ask Different

Posted by jpluimers on 2023/07/10

That was more difficult than I anticipated: [Wayback/Archive] how do I merge the tabs of two open Preview windows if I have more than two open? – Ask Different

First of all, make sure that the “tab bar” is displayed by choosing “view”->”Show Tab Bar”. Then, you should be seeing the tab bar, which displays the file name:
enter image description here
Then, in the other preview window, click and hold the tab bar, and drag it onto the tab bar of the target preview window. Using this method, you can merge as many tabs as you want.
Tested on MacOS Catalina 10.15.4

Read the rest of this entry »

Posted in Apple, Mac OS X / OS X / MacOS, macOS 10.12 Sierra, macOS 10.13 High Sierra, Power User, Uncategorized | Leave a Comment »

I learned: MacOS has a Unicode Hex Input keyboard

Posted by jpluimers on 2023/05/25

A while ago, I learned that MacOS has had a Unicode Hex Input keyboard since ages.

It is not installed by default, so you have to manually add it:

  1. Start the System Preferences.app
  2. Open the Keyboard icon
  3. Choose the Input Sources tab
  4. Click the plus (+) icon
  5. Search for Unicode or Hex to get so Unicode Hex Input is the only entry in the list
  6. Click the Add  button
  7. Choose the Keyboard tab
  8. Enable Show keyboard and emoji viewers in menu bar

Now in the menu bar, you can select the Unicode Hex Input.

After that, when holding the Option key, any 4-digit Unicode sequence will get you a Unicode character.

Read the rest of this entry »

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

Towards a work setup on a hardened host and doing everything in VMs

Posted by jpluimers on 2023/04/21

SwiftOnSecurity posted this interesting tweet in 2021: [Archive] SwiftOnSecurity on Twitter: “Lenovo P1 Gen3 with 12core Xeon, 64GB RAM, two 1TB M.2 SSDs. Running Windows Server 2022 with the Hyper-V role. All hardening applied to host OS, almost nothing happens here except managing guest VMs. On the second SSD I then have Win10 VMs joined to the corporate domain.” / Twitter.

I wonder if a similar setup can be done using an Apple M1 based machine as host and running all work in virtual machines.

Swift had some issues getting cameras and microphones to work: [Archive] SwiftOnSecurity on Twitter: “The problem here is Teams. If I want to pass through my webcam and microphone that could get a bit dicey, despite HyperV Enhanced Session being essentially an RDP session. For now I’m using my phone for Teams microphone. Also I’m not sure how well thermal management will work….” / Twitter

This resulted in some answers and interesting links:

Some more interesting tweets in that thread:

–jeroen

Posted in Apple, M1 Mac, Mac, Power User, Windows | Leave a Comment »

Way easier to fix on Intel MacBook machines than I thought: macos kernel_task high cpu dual screen

Posted by jpluimers on 2023/03/13

The links found via [Wayback/Archive] macos kernel_task high cpu dual screen – Google Search were daunting.

In the end, the issue ways way easier to fix than I thought: open up your Intel MacBook (you need pentalobe screwdrivers for that), then with some compressed air, clean the dust (especially from the fans).

This post saved my day [Wayback/Archive] kernel_task takes up 500% of my CPU when plugging in external monitor – MacBook Pro 15″ Retina Display Mid 2015 – iFixit

Things I haven’t tried yet:

  • Cleaning out more free space from HDD
  • Using plain HDMI cable into the HDMI cable port
  • Taking MBP apart and cleaning any potential dust


Block Image

I faced the very same issue that you guys are facing and based on input from another forum decided to get my 2016 MPB fans cleaned out.

This made an immediate impact where when I connected my external display to the MBP.pre-cleaning, it would overheat causing the fans to spin at 6000 rpm or thereabout and the kernel_task would eat up 500%-900% of the CPU rending the system unusable.

This simple cleanup of the fans has allowed me to connect the monitor with no kernel panic anymore and even though the fans run around 5000 rpm now the CPU and GPU are running around 10 degrees cooler now.

The same picture is in [Wayback/Archive] macos – MacBook Pro high CPU with external monitors – Ask Different.

An even dirtier MacBook was at [Wayback/Archive] External Display – High CPU Usage – MacBo… – Apple Community.

Links that were interesting but unhelpful:

–jeroen

Read the rest of this entry »

Posted in Apple, Mac, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, Power User | Leave a Comment »

40th Lisa anniversary last week: download Apple Lisa OS Software version 3.1 source code files

Posted by jpluimers on 2023/01/30

I missed this because there is no RSS feed for [Wayback/Archive] Art of Code – CHM* (there is an email [Wayback/Archive] Art of Code Subscription, but [Wayback/Archive] Email is so last century • The Register).

Anyway: the Apple Lisa turned 40 last week and to celebrate that, the Lisa OS Software got released to the public through the Computer History Museum. That is: after you accept the [Wayback/Archive] Download Apple Lisa source code files: APPLE ACADEMIC LICENSE AGREEMENT Lisa OS Software version 3.1, or just download [Wayback] d1yx3ys82bpsa0.cloudfront.net/source/lisa-source.zip.

Read the rest of this entry »

Posted in 68k, Apple, Apple Lisa, History, Power User | Leave a Comment »

veltman/clmystery: A command-line murder mystery; an interactive tutorial for learning the *n*x command-line

Posted by jpluimers on 2023/01/18

Since I’m on a series of interactive tutorial sites, yesterday’s The SQL Murder Mystery made me bump into a project by [Archive] Noah Veltman (@veltman) / Twitter: [Wayback/Archive] veltman/clmystery: A command-line murder mystery

There’s been a murder in Terminal City, and TCPD needs your help.

To figure out whodunit, you need access to a command line.

Once you’re ready, clone this repo, or download it as a zip file.

Open a Terminal, go to the location of the files, and start by reading the file ‘instructions’.

I did a quick [Archive] clmystery – Twitter Search / Twitter and found the first ever Twitter mention to be this one from 2013 (boy, have I been living under a stone <g>): [Archive] RoR Group on Twitter: “A command-line murder mystery (clmystery) …” / Twitter.

Cool things:

–jeroen

Posted in *nix, *nix-tools, Apple, Development, Interactive Tutorials, Learning/Teaching, LifeHacker, Linux, Mac OS X / OS X / MacOS, Power User, Software Development, Terminal | 2 Comments »

Getting your public IP address from the command-line when http and https are blocked: use DNS

Posted by jpluimers on 2022/12/28

Years ago, I wrote Getting your public IP address from the command-line. All methods were http based, so were very easy to execute using cURL.

But then in autumn 2021, Chris Bensen wrote this cool little blog-post [Wayback/Archive] Chris Bensen: How do I find my router’s public IP Address from the command line?:

dig -4 TXT +short o-o.myaddr.l.google.com @ns1.google.com

At first sight, I thought it was uncool, as the command was quite long and there was no explanation of the dig command trick.

But then, knowing that dig is a DNS client, it occurred to me: this perfectly works when http and https are disabled by your firewall, but the DNS protocol works and gives the correct result:

# dig -4 TXT +short o-o.myaddr.l.google.com @ns1.google.com
"80.100.143.119"

This added the below commands and aliases to my tool chest for *nix based environments like Linux and MacOS (not sure yet about Windows yet :), but that still doesn’t explain why it worked. So I did some digging…

IPv4

  • command:
    dig -4 TXT +short o-o.myaddr.l.google.com @ns1.google.com
  • command removing outer double quotes:
    dig -4 TXT +short o-o.myaddr.l.google.com @ns1.google.com | xargs
  • alias:
    alias "whatismyipv4_dns=dig -4 TXT +short o-o.myaddr.l.google.com @ns1.google.com | xargs"

IPv6

  • command:
    dig -6 TXT +short o-o.myaddr.l.google.com @ns1.google.com
  • command removing outer double quotes:
    dig -6 TXT +short o-o.myaddr.l.google.com @ns1.google.com | xargs
  • alias:
    alias "whatismyipv6_dns=dig -6 TXT +short o-o.myaddr.l.google.com @ns1.google.com | xargs"

How it works

Let’s stick to dig and IPv4 as that not having IPv6 (regrettably still) is the most common situation today:

# dig -4 TXT +short o-o.myaddr.l.google.com @ns1.google.com
"80.100.143.119"

What it does is request the DNS TXT record of o-o.myaddr.l.google.com from the Google DNS server ns1.google.com and returns the WAN IPv4 address used in the DNS request, which is for instance explained in [Wayback/Archive] What is the mechanics behind “dig TXT o-o.myaddr.l.google.com @ns1.google.com” : linuxadmin.

Since these are TXT records, dig will automatically double quote them, which xargs can remove (see below how and why):

# dig -4 TXT +short o-o.myaddr.l.google.com @ns1.google.com | xargs
80.100.143.119

The DNS query will fail when requesting the Google Public DNS servers 8.8.8.8 or 8.8.4.4:

# dig -4 TXT +short o-o.myaddr.l.google.com @8.8.8.8
"2a00:1450:4013:c1a::103"
"edns0-client-subnet 80.101.239.0/24"

Or, with quotes removed (the -L 1 ensures that xargs performs the quote-pair removal action on each line):

# dig -4 TXT +short o-o.myaddr.l.google.com @8.8.8.8 | xargs -L 1
2a00:1450:4013:c1a::103
edns0-client-subnet 80.101.239.0/24

This request is both slower than requesting the ns1.google.com server and wrong.

The reason is that only ns1.google.com understands the special o-o.myaddr.l.google.com hostname which instructs it to return the IP address of the requesting dig DNS client.

That 8.8.8.8 returns a different IP address and an additional edns0-client-subnet with less accurate information is explained in an answer to [Wayback/Archive] linux – Getting the WAN IP: difference between HTTP and DNS – Stack Overflow by [Wayback/Archive] argaz referring to this cool post: [Wayback/Archive] Which CDNs support edns-client-subnet? – CDN Planet.

Not just ns1.google.com: any DNS server serving the google.com domain

Since o-o.myaddr.l.google.com is part of the google.com domain, the above works for any DNS server serving the google.com domain (more on that domain: [Wayback/Archive] General DNS overview  |  Google Cloud).

Getting the list of DNS servers is similar to getting the list of MX servers which I explained in Getting the IP addresses of gmail MX servers, replacing MX record type (main exchange) with the NS record type (name server) and the gmail.com domain with the google.com domain:

# dig @8.8.8.8 +short NS google.com
ns3.google.com.
ns1.google.com.
ns2.google.com.
ns4.google.com.

The ns1.google.com DNS server is a special one of the NS servers: it is the start of authority server, which you can query using the SOA record type that also gives slightly more details for this server:

# dig @8.8.8.8 +short SOA google.com
ns1.google.com. dns-admin.google.com. 410477869 900 900 1800 60

The difference between using NS and SOA records with dig are explained in the [Wayback] dns – How do I find the authoritative name-server for a domain name? – Stack Overflow answer by [Wayback/Archive] bortzmeyer who also explains how to help figuring out SOA and NS discrepancies (note to self: check out the check_soa tool originally by Michael Fuhr (I could not find recent content of him, so he might have passed away) of which source code is now at [Wayback/Archive] Net-DNS/check_soa at master · NLnetLabs/Net-DNS).

So this works splendid as well using ns4.google.com on my test system:

# dig -4 TXT +short o-o.myaddr.l.google.com @ns4.google.com | xargs
80.100.143.119

The xargs removes outer quotes removal trick

[Wayback/Archive] string – Shell script – remove first and last quote (“) from a variable – Stack Overflow (thanks quite anonymous [Wayback/Archive] user1587520):

> echo '"quoted"' | xargs
quoted

xargs uses echo as the default command if no command is provided and strips quotes from the input.

More on https versus DNS requests

Some notes are in [Wayback/Archive] How to get public IP address from Linux shell, but note the telnet trick now fails as myip.gelma.net is gone (latest live version was archived in the Wayback Machine in august 2019).

Via

–jeroen

Posted in *nix, *nix-tools, Apple, bash, bash, Batch-Files, Communications Development, Development, DNS, Internet protocol suite, Linux, Mac, Mac OS X / OS X / MacOS, Power User, Scripting, Software Development, TCP | Leave a Comment »

Add AirPlay to Your Classic Stereo with an Old Apple TV – TidBITS

Posted by jpluimers on 2022/09/19

[Wayback/Archive.is] Add AirPlay to Your Classic Stereo with an Old Apple TV – TidBITS which has a good description including a list of needed parts:

  • Second- or third-generation Apple TV
  • Power cable
  • TOSLINK Digital-to-Analog (D/A) Converter
  • Pair of RCA Cables

These are only needed the first time to setup the Apple TV 2nd or 3rd generation:

  • HDMI Cable
  • Remote

Note that the Apple TV 4th generation or Apple TV 4K devices won’t work: they lack a TOSLINK interface.

You can work around this by using an HDMI audio extractor [Wayback/Archive.is]. Some can provide S/PDIF / TOSLINK output, others can directly do line out (so you do not need the above TOSLINK D/A converter):

Usually the Apple TV 2nd or 3rd generation solution is way cheaper, as they go for very little money on second hand sites.

–jeroen

Posted in Apple, Apple TV, Hardware, Home Audio/Video, iOS, Power User | Leave a Comment »