- Format USB drive: Master Boot Record scheme and format set to MS-FAT (aka FAT32).
- Use unetbootin.app to flash iso to drive.
- Alternatively / as backup approach see Create a Bootable ESXi Installer USB Flash Drive on macOS
| // | |
| // main.swift | |
| // Shell Notification Center | |
| // | |
| // Created by Keng Lee on 2021/1/15. | |
| // | |
| import Foundation | |
| import Combine | |
| var bag = Set<AnyCancellable>() |
Disable:
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
Enable:
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
The libdispatch is one of the most misused API due to the way it was presented to us when it was introduced and for many years after that, and due to the confusing documentation and API. This page is a compilation of important things to know if you're going to use this library. Many references are available at the end of this document pointing to comments from Apple's very own libdispatch maintainer (Pierre Habouzit).
My take-aways are:
-
You should create very few, long-lived, well-defined queues. These queues should be seen as execution contexts in your program (gui, background work, ...) that benefit from executing in parallel. An important thing to note is that if these queues are all active at once, you will get as many threads running. In most apps, you probably do not need to create more than 3 or 4 queues.
-
Go serial first, and as you find performance bottle necks, measure why, and if concurrency helps, apply with care, always validating under system pressure. Reuse
| import Foundation | |
| /// This isn't safe to use before Swift gets ABI stability, because generic classes | |
| /// could change their names. Also, be sure to register bridges with the Obj-C runtime | |
| /// if using to decode during iOS state restoration. | |
| /// | |
| class CodableBridge<Wrapped: Codable>: NSObject, NSSecureCoding { | |
| let value: Wrapped | |
| init(_ value: Wrapped) { self.value = value } |
| // | |
| // SpinlockTestTests.swift | |
| // SpinlockTestTests | |
| // | |
| // Created by Peter Steinberger on 04/10/2016. | |
| // Copyright © 2016 PSPDFKit GmbH. All rights reserved. | |
| // | |
| import XCTest |
| -> ice ~ % sqlite3 | |
| SQLite version 3.8.6 2014-08-15 11:46:33 | |
| Enter ".help" for usage hints. | |
| Connected to a transient in-memory database. | |
| Use ".open FILENAME" to reopen on a persistent database. | |
| sqlite> | |
| WITH RECURSIVE xaxis(x) AS (VALUES(-2.0) UNION ALL SELECT x+0.05 FROM xaxis WHERE x<1.2), yaxis(y) AS (VALUES(-1.0) UNION ALL SELECT y+0.1 FROM yaxis WHERE y<1.0), m(iter, cx, cy, x, y) AS ( SELECT 0, x, y, 0.0, 0.0 FROM xaxis, yaxis UNION ALL SELECT iter+1, cx, cy, x*x-y*y + cx, 2.0*x*y + cy FROM m WHERE (x*x + y*y) < 4.0 AND iter<28 ), m2(iter, cx, cy) AS ( SELECT max(iter), cx, cy FROM m GROUP BY cx, cy ), a(t) AS ( SELECT group_concat( substr(' .+*#', 1+min(iter/7,4), 1), '') FROM m2 GROUP BY cy ) SELECT group_concat(rtrim(t),x'0a') FROM a; | |
| sqlite> ....# | |
| ..#*.. | |
| ..+####+. |