| import Darwin | |
| import Foundation | |
| import UIKit | |
| // https://github.com/xybp888/iOS-SDKs/blob/master/iPhoneOS17.1.sdk/System/Library/PrivateFrameworks/CoreSVG.framework/CoreSVG.tbd | |
| // https://developer.limneos.net/index.php?ios=17.1&framework=UIKitCore.framework&header=UIImage.h | |
| @objc | |
| class CGSVGDocument: NSObject { } |
| Changes for the scripts of the Anki Wanikani Ultimate 2 deck, feel free to use them how you like. | |
| Features: | |
| - Automatic Romaji to Kana conversion in reading input using WanaKana. | |
| - Multiple input support (separated by a space for readings and by a comma for meanings, | |
| eg: "axe, loaf bread counter" or "あめ あま"). | |
| - Shows each right and wrong answer from your input. | |
| - Automatic resizing of characters for small screens. | |
| - Reordered the Back template of the cards to be more similar to the Wanikani site (reading related things come first in reading cards, | |
| same for meaning). |
| // | |
| // ExampleWindowReaderApp.swift | |
| // Shared | |
| // | |
| // Created by Matthaus Woolard on 21/12/2020. | |
| // | |
| import SwiftUI | |
| @main |
| { | |
| "app-store-connect": { | |
| "101 TestFlight": [ | |
| "https://devstreaming-cdn.apple.com/videos/tutorials/TestFlight_App_Store_Connect_2018/TestFlight_App_Store_Connect_2018_hd.mp4", | |
| "https://devstreaming-cdn.apple.com/videos/tutorials/TestFlight_App_Store_Connect_2018/TestFlight_App_Store_Connect_2018_sd.mp4" | |
| ], | |
| "102 App Analytics Overview": [ | |
| "https://devstreaming-cdn.apple.com/videos/tutorials/Analytics_Overview_Pt2/Analytics_Overview_hd.mp4", | |
| "https://devstreaming-cdn.apple.com/videos/tutorials/Analytics_Overview_Pt2/Analytics_Overview_sd.mp4" | |
| ], |
| #!/bin/sh | |
| set -eu | |
| create_iconset() { | |
| mkdir -p Ghidra.iconset | |
| cat << EOF > Ghidra.iconset/Contents.json | |
| { | |
| "images": | |
| [ |
| import SwiftSyntax | |
| import SwiftSemantics | |
| import Foundation | |
| let source = try! String(contentsOf: URL(fileURLWithPath: "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/SwiftUI.framework/Modules/SwiftUI.swiftmodule/arm64e.swiftinterface")) | |
| var collector = DeclarationCollector() | |
| let tree = try SyntaxParser.parse(source: source) | |
| tree.walk(&collector) |
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
| # One liner | |
| wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com | |
| # Explained | |
| wget \ | |
| --recursive \ # Download the whole site. | |
| --page-requisites \ # Get all assets/elements (CSS/JS/images). | |
| --adjust-extension \ # Save files with .html on the end. | |
| --span-hosts \ # Include necessary assets from offsite as well. | |
| --convert-links \ # Update links to still work in the static version. |