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

macos – How can I modify the list of Applications under ‘Open With…’? – Ask Different

Posted by jpluimers on 2019/11/22

Some interesting links on the “open with” database:

Simple solution to clean the list:

# Clean up LaunchServices to remove duplicates in the “Open With” menu.
alias lscleanup="/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user && killall Finder"`

These were by products of what I was really searching for:

Why are some items grey when modifying the “Open with…” settings?

Some applications are greyed out, for instance when editing the “Open with…” for the .cap extension (which are pcap network captures that Wireshark can process).

After the steps below, sometimes the menu still does not update for all files of that extension.

This alias helped me to get that to work: alias restart-finder='killall -KILL Finder'.

Links that helped me finding out:

The trick is to toggle “Recommended Applications” into “All Applications”:

Then you can select “Wireshark.app”:

 

The same happens when you filter on a name (for instance because you know that Wireshark will work fine):

A final thing is that you have to check “Always Open With” so it ends up in the list.

–jeroen

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

20 Cool Command Line Tricks for Windows and macOS

Posted by jpluimers on 2019/11/08

After all these years in the field, I still learned new tricks from [WayBack20 Cool Command Line Tricks for Windows and macOS which I have rephrased:

Windows

1) View installed drivers: [WayBack] driverquery

2) Watch Star Wars in ASCII: [WayBacktelnet towel.blinkenlights.nl

3) Save folder trees to disk: tree (I had totally forgotten about this, probably because it leaves out a lot of directories and files)

5) Show your Wi-Fi password [WayBacknetsh wlan show profile SSID key=clear (replace SSID with your network name; use nets wlan show profile to view the network names)

7) Check your laptop’s battery health: [WayBack] powercfg /batteryreport which will be in ” and hit Enter to generate the report, then %HOMEPATH%\battery-report.html

8) View your Windows license key: wmic path softwarelicensingservice get OA3xOriginalProductKey [WayBack]

Mac OS X / macOS / however it is called now

1) Change the default screenshot type: [WayBackdefaults write com.apple.screencapture type JPG (you can also use JP2 (for JPEG2000), PDF, PNG, TIFF and others)

2) Get your Mac to speak to you: use say

3) Add a message to the login screen: sudo defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText "your new text on the logon window" [WayBack]

4) Play Tetris and other classics: start emacs, then press Esc followed by X, type in tetris, pong, snake or solitaire (to exit emacs, press CtrlX followed by CtrlC). There are [WayBack] more emacs games.

5) Get a dictionary definition: run curl dict://dict.org/d:word (where word is what you are after) which uses the [WayBack] dict protocol

6) Keep macOS awake: [WayBack] caffeinate optionally followed by a -t## parameter where ## is the number of seconds to not sleep.

7) Show hidden files: defaults write com.apple.finder AppleShowAllFiles -bool TRUE; killall Finder or use this AppleShowAllFiles script which I had forgotten about writing in the first place.

10) Add Spaces to the Dock: defaults write com.apple.dock persistent-apps -array-add ‘{”tile-type”=”spacer-tile”;}’; killall Dock running the command as many times as you want spaces. To get rid of a space you’ve added, just drag them to the Trash.

–jeroen

via: [WayBack] 20 Cool Command Line Tricks for Windows and macOS http://flip.it/SvcQlu – Joe C. Hecht – Google+

Posted in *nix, *nix-tools, Apple, cURL, Power User | Leave a Comment »

TestDisk, Data Recovery; free and open source

Posted by jpluimers on 2019/10/28

Interesting tool that I needed one day to figure out how to recover from a certain NTFS partition having become RAW [Archive.is/WayBackTestDisk, Data Recovery:

TestDisk is powerful free data recovery software! It was primarily designed to help recover lost partitions and/or make non-booting disks bootable again when these symptoms are caused by faulty software: certain types of viruses or human error(such as accidentally deleting a Partition Table). Partition table recovery using TestDisk is really easy.
TestDisk can
  • Fix partition table, recover deleted partition
  • Recover FAT32 boot sector from its backup
  • Rebuild FAT12/FAT16/FAT32 boot sector
  • Fix FAT tables
  • Rebuild NTFS boot sector
  • Recover NTFS boot sector from its backup
  • Fix MFT using MFT mirror
  • Locate ext2/ext3/ext4 Backup SuperBlock
  • Undelete files from FAT, exFAT, NTFS and ext2 filesystem
  • Copy files from deleted FAT, exFAT, NTFS and ext2/ext3/ext4 partitions.
TestDisk has features for both novices and experts. For those who know little or nothing about data recovery techniques, TestDisk can be used to collect detailed information about a non-booting drive which can then be sent to a tech for further analysis. Those more familiar with such procedures should find TestDisk a handy tool in performing onsite recovery.

–jeroen

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

Setting Up a New Mac: Should You Migrate or Do a Clean Installation? | The Mac Security Blog

Posted by jpluimers on 2019/10/07

Interesting read: [WayBackSetting Up a New Mac: Should You Migrate or Do a Clean Installation? | The Mac Security Blog

–jeroen

Posted in Apple, iMac, Mac, Mac OS X / OS X / MacOS, Mac OS X 10.4 Tiger, Mac OS X 10.5 Leopard, Mac OS X 10.6 Snow Leopard, Mac OS X 10.7 Lion, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, MacMini, macOS 10.12 Sierra, OS X 10.10 Yosemite, OS X 10.11 El Capitan, OS X 10.8 Mountain Lion, OS X 10.9 Mavericks, Power User | Leave a Comment »

How to start up your Mac in Internet Recovery Mode

Posted by jpluimers on 2019/09/13

When all else fails: [WayBackHow to start up your Mac in Internet Recovery Mode.

Command-Option-R is one of the plethora of keyboard tricks you can use during boot:

Some Mac features are available by holding down certain keys during startup.

[WayBackStartup key combinations for Mac – Apple Support

 

Hold during startup Description
Shift ⇧ Start up in Safe Mode.
Option ⌥ Start up to Startup Manager.
C Start up from a bootable CD, DVD, or USB thumb drive (such as OS X install media).
D Start up to either Apple Hardware Test or Apple Diagnostics, depending on which Mac you’re using.
Option-D Start up to either Apple Hardware Test or Apple Diagnostics over the Internet.
N Start up from a compatible NetBoot server.
Option-N Start up from a NetBoot server using the default boot image.
Command (⌘)-R Start up from OS X Recovery.
Command-Option-R Start up from OS X Recovery over the Internet.
Command-Option-P-R Reset NVRAM. Release the keys after you hear the startup sound again.
Command-S Start up in single-user mode.
T Start up in target disk mode.
X Start up from an OS X startup volume when the Mac would otherwise start up from a non-OS X startup volume.
Command-V Start up in verbose mode.
Eject (⏏), F12, mouse button, or trackpad button Eject removable media, such as an optical disc.

Read the rest of this entry »

Posted in Apple, Mac, Mac OS X / OS X / MacOS, MacBook, MacBook Retina, MacBook-Pro, OS X 10.11 El Capitan, OS X 10.9 Mavericks, Power User | Leave a Comment »

Early version of Apple II Logo. · PDP-10/its-vault@4145dea · GitHub

Posted by jpluimers on 2019/09/04

[WayBack] Early version of Apple II Logo. · PDP-10/its-vault@4145dea · GitHub:

Early version of Apple II Logo.

Written by:
- Stephen L. Hain
- Patrick G. Sobalvarro
- Leigh L. Klotz

Brows the source files at [WayBack] its-vault/files/aplogo at master · PDP-10/its-vault · GitHub.

Via Lars Brinkhoff – Google+ commenting at [WayBack] This week, Logo on the 6502, in honour of Seymour Papert who died this week. He did a lot more, but Logo is a lasting and perhaps most visible contribut… – mos6502 – Google+.

Instructions at [WayBack] its-vault/usage.doc at master · PDP-10/its-vault · GitHub

–jeroen

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

How to Install Node.js and NPM on a Mac

Posted by jpluimers on 2019/09/03

Link archival: [WayBack] How to Install Node.js and NPM on a Mac:

In this article, I’ll take you through the process of installing Node.js and NPM on a Mac using Homebrew.

TL;DR

  1. Ensure you have installed homebrew.
  2. Run brew install node.

–jeroen

 

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

How to Update All Your Ruby Gems At Once | Life, the Universe, and Everything

Posted by jpluimers on 2019/08/26

This looks smart

gem update `gem list | cut -d ' ' -f 1`

From: [WayBack] How to Update All Your Ruby Gems At Once | Life, the Universe, and Everything

Though on the bash prompt, it works fine on Mac OS X / OS X / macOS / …, it does not work nice as an alias.

You can get it to work with difficult escaping (or nesting).

But it is easier to escape this:

gem update $(gem list | cut -d ' ' -f 1)

Escaped, it comes down to:

alias "gem-update-all=gem update \$(gem list | cut -d ' ' -f 1)"

Based on:

–jeroen

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

Signal messaging downloads

Posted by jpluimers on 2019/08/23

I forgot about the announcement that Signal had also become available on the Desktop, but it is via [WayBack] https://signal.org/download/:

  • Mac
  • Windows
  • Debian based x64 Linux:

$ curl -s https://updates.signal.org/desktop/apt/keys.asc | sudo apt-key add -
$ echo "deb [arch=amd64] https://updates.signal.org/desktop/apt xenial main" | sudo tee -a /etc/apt/sources.list.d/signal-xenial.list
$ sudo apt update && sudo apt install signal-desktop

I like the mix of echo and tee to update the [WayBack] /etc/apt/sources.list.d folder with the signal-xenial.list file.

These links will always give you the latest download filename:

The files you get there will be relative to the path https://updates.signal.org/desktop/ so will be similar to:

You can get the sources at https://github.com/WhisperSystems/Signal-Desktop/releases

Via:

–jeroen

Posted in *nix, Android Devices, Apple, Debian, iMac, iOS, iPhone, Linux, Mac, Mac OS X / OS X / MacOS, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, MacMini, macOS 10.12 Sierra, Power User, Windows | Leave a Comment »

Inactive GUI applications: click once or twice to perform an action within the application

Posted by jpluimers on 2019/08/07

When an application is inactive, you have to click it at least once to activate it, but sometimes click twice to actually perform an action.

In the past, there were more applications requiring it, even User Interface or Human Interface guidelines explaining the difference.

Nowadays, most of these guidelines have become hard to find, but luckily some of them have been archived in the WayBack machine.

They all come down to this:

An action in an application can be disruptive, especially when there is no confirmation step for it.

Clicking an application over the area that invokes such a disruptive action, without the user realising it can have adverse consequences.

Some links for further reading:

 

Enabling Click-Through

An item that provides click-through is one that a user can activate with one click, even though the item is in an inactive window. (To activate an item that does not support click-through, the user must first make the containing window active and then click the item.) Although click-through can make some user tasks easier, it can also confuse users if they click items unintentionally.

Click-through is not a property of a class of controls; any control, including toolbar items, can support click-through. This also means that you can support click-through for any subset of items; you don’t have to choose between supporting click-through for all items in a window or none. Follow the guidelines in this section so that you can support click-through when it’s appropriate.

Avoid providing click-through for an item or action whose result might be dangerous or undesirable. Specifically, avoid enabling click-through for an item that:

  • Performs a potentially harmful action that users can’t cancel (for example, the Delete button in Mail)
  • Performs an action that is difficult or impossible to cancel (such as the Send button in Mail)
  • Dismisses a dialog without telling the user what action was taken (for example, the Save button in a Save dialog that overwrites an existing file and automatically dismisses the dialog)
  • Removes the user from the current context (for example, selecting a new item in a Finder column that changes the target of the Finder window)

Clicking in any one of these situations should cause the window that contains the item to be brought forward, but no other action to be taken.

In general, it’s safe to provide click-through for an item that asks the user for confirmation before executing, even if the command ultimately results in destruction of data. For example, you can provide click-through for a delete button if you also make sure to give users the opportunity to cancel or confirm the action before it proceeds.

Think twice before supporting click-through for items that don’t provide confirmation feedback. Specifically, consider how dangerous the action might be, and determine how difficult it will be for the user to undo the action after it’s performed. For example, the Mail Delete button does not provide click-through because it deletes a message without asking for confirmation, which is a potentially harmful action that can be difficult to undo. On the other hand, click-through for the New button in Mail is fine because its resulting action is not harmful and is easy to undo.

Ensure that items that don’t support click-through appear disabled when their window is inactive. The disabled appearance helps users understand that these controls are unavailable. For example, the Delete and Mark as Junk buttons in the inactive Mail window shown below don’t support click-through.

An inactive window with controls that support click-through

–jeroen

Posted in Apple, Classic Macintosh, Development, Mac, Mac OS X / OS X / MacOS, Power User, Software Development, Usability, User Experience (ux), Windows | Leave a Comment »