Categories
Nerds

Virtualizing OS X is easy now!

If you’re interested in virtualizing OS X on M1, it’s now very streamlined thanks to Saagarjha @ Github. Check out the VirtualApple project (1). All you need to do is download an IPSW (2) and follow the instructions after running the project in XCode and you’re in business. Great plug-and-play solution!

Make sure to download an IPSW that is equal to, or less than, your current OS X installation or it may hang.

Note that Apple has disabled iCloud login from the virtualization framework. I haven’t tested any other services.

1. https://github.com/saagarjha/VirtualApple
2. https://mrmacintosh.com/apple-silicon-m1-full-macos-restore-ipsw-firmware-files-database/

Categories
Nerds

iOS Shortcut Party! Location & Mono audio examples

Recently switched to the light side. After a dozen years, I finally had enough with Android and Google’s lack of will for innovation.

Ten years ago, I was flying out of Chicago and couldn’t help but overhear the conversation next to me; the words that I should have taken to heart: Apple makes their own hardware, so they don’t need to worry about a thousand smartphones made by 3rd parties.

One inexpensive but frustrating bout with Google Fi as my phone provider later, here I am. But there is one thing that’s missing from iOS: the ability to toggle your location setting easily. Android users can do that from the drawer in a snap. Apple doesn’t want you to touch it, and forces you to acknowledge a warning each time you toggle the option.

The other thing I prefer, that Android doesn’t provide built-in, is mono audio. Hear-through earbuds aren’t my jam and I want to catch every note when I listen to one side!

Luckily, iOS provides an easy way to toggle these options, and many others, using Shortcuts.

Shortcuts can be intimidating to a new user. The app was obviously designed by people who are familiar with the iOS ecosystem. I’m used to old-school AppleScript, so I assumed that baked-in system actions would be available under Shortcuts > New > Scripting. Wrong! Now we navigate using a URL.

For this tutorial, open up the Shortcuts app, then click the + sign to create a new shortcut.

Next, choose “Web”. The select Safari > Open URLs.

You’ll see a new screen. Click “URL” in dimmed blue and enter the following text depending on which action you want to take.

Location toggle:

prefs:root=PRIVACY&path=LOCATION

Mono toggle:

prefs:root=ACCESSIBILITY&path=AUDIO_VISUAL_TITLE#AXPAMonoSpecID

Pretty straightforward — root is the top-level System Preferences item and path is the specifier.

Next, rename the shortcut to an easily identifiable name. Then long-click on your home screen, add a widget, and choose Shortcut from the long app list. It will be near the end. Select “Shortcut” and then add the specific one you just created.

Test, and enjoy!

Categories
Nerds

Hello, Worldle! #0

I’m a huge fan of Worldle, the geography offshoot of Wordle.

Here are my hacks:

1. It sounds cliché but it works: get a sheet of graph paper, open an online map, and draw away. Even if your artistic skills are off, contouring with your own mind is a fast and easy way to get familiar with a region you don’t know well. If you have a graphics tablet, make a new layer for each country in Photoshop/GNUimp.

2. Using a map again, go ahead and start making mnemonic devices. Start with categories like these:
• Could fit within a ball (Poland, Suriname, North Macedonia)
• Oriented on an axis
• Lobed (like Austria, Afghanistan, Latvia, Zambia, Tajikstan, Bangladesh, or Moldova)
• Cutouts like Gambia inside of Senegal, Lesotho inside South Africa, or San Marino and the Vatican in Italy
• The Horn of Africa is a rhino; Somalia is the horn, Djibouti is the eye, Eritrea is the ear, and Ethiopia is the noggin.
• Shaped in a way that it can “only” be that country –
••Guatemala has a facial side profile in the lower left corner and wears an enormous hat, but also bears a resemblance to the Gabon;
••The Vatican is a fortress;
••Words can’t begin to describe Venezuela’s anti-Gestalt attitude.
Guernsey and Jersey are apparently super easy for French people, but Americans will get hung up easily.
••Tanzania and French Guiana are both shaped like Wisconsin.
••Panama is a classic sideways-S shape with numerous channels and inlets.
••In wealthy locales such as Monaco, Hong Kong, or Qatar, you can easily see the docks outlined.
••Greece is a hundred islands shaped in an oval tilted towards the north-east.
••El Salvador is tricky and yet another sideways country, but you can see its tattoo of a harbor in the southeast sector.
••Madagascar – always a favorite – windswept Indian ocean currents carve out a smooth eastern shoreline while the west side guards Mozambique and Tanzania.
••Puerto Rico is 1 main island surrounded by 4 smaller islands on each corner.
••NSFW… Norway, Sweden, Finland is the mnemonic.
••Niger? Friendly pufferfish swimming northeast-bound.
••East Timor has westward island that make the mainland look like it’s going to ea(s)t them.
••Republic of the Congo and Pakistan have virtually the same shape.

3. If you’re feeling saucy, you can toggle the difficulty in-game by checking and unchecking “Replace proximity percent by size percent” to get an edge.

4. Take screenshots! That way you can refer back to what guesses worked and what didn’t.

5. The hot spots are the Balkans, the Antilles (Greater/Lesser), the ****stan countries, and southeast Asia. If you can master those, you can then proceed to the Pacific Island nations lmao.

6. Differences between Guyana, French Guiana, Equitorial Guinea, Guinea-Bissau, and Guinea.

7. Americans tend not to know these highly-populated countries: Indonesia, Pakistan, Nigeria, Bangladesh. They all have significant Muslim populations. Only Indonesia is a member of the G20.

Categories
Nerds

Quickie: “Dark Territory” by Fred Kaplan

Five years ago, I read “Dark Territory“. If you like non-fiction then it’s a smooth operator and it goes in depth on cybersecurity at the human and physical levels.

My biggest takeaway came near the end, when it becomes apparent that the only way to eliminate the threat of Zero-Day exploits is to either proactively repair everything and all of the historic code, or come up with a new computing architecture. So… that was interesting.

Categories
Nerds

How to: CISC Python packages on Apple RISC Silicon

Unfortunately, several popular data science Python packages like Pandas and Numpy don’t currently compile on the M1 or M2 chip. This post will outline an easy way to set-it-and-forget-it using Rosetta 2, which emulates Intel CISC instructions on Apple Silicon.

But what’s the advantage of doing it this way? What are the disadvantages?
Typically, you do not want to create more Python chaos than already exists, as this ecosystem can be a huge PITA to deal with.
• This method works because the code is picked up from your system & sent off to the Intel x86_64 compilation queue instead of the arm64 compilation queue.
• The disadvantage is that you’re going to end up maintaining two environments. For example, if you try to run something that’s unavailable, e.g. you installed a package with arm64 and try to run it in Intel x86_64 mode, it will fail along the lines of:
incompatible architecture (have 'arm64', need 'x86_64'))
• The good news is that as long as you stick with pipenv, homebrew, or macports then walking back the system installation is usually easy if imperfect.

How to:
• Download an alternative terminal app like iTerm2. This will set up all operations contained by the app to run in Intel x86 emulation mode, and the Python packages will compile using pipenv.

(Optional) Set up your terminal to notify you each time you open a new window by adding “echo $(uname -m)” to your .zshrc file. Kudos to indiespark for the tip about environment notification – see footnote for more info.

echo $(uname -m)
Left: arm64 – Right: x86_64 emulator

(Optional) Back in the Finder, I customized the Icon by pasting “x86” over the terminal icon in Photoshop, and on top of that, I’ve effectively created a second python environment.

Easily visible icon for intel environment, or you can use another app like iTerm

Duplicating Terminal seems like a non-starter, and I would avoid doing that. Using a totally different app is safer for this use case.

  1. Here’s a good read about arm64 and intel modes that can outline the difference in more detail.