This is a draft.
macOS doesn’t have many of the advanced Linux or UNIX features that have come about in the past 20 years. So getting a proper chroot environment up and running takes a little more work.
| pnmcat -jleft -tb \ | |
| <(pngtopnm image139.png) \ | |
| <(pngtopnm image73.png) \ | |
| | pnmtopng \ | |
| -alpha <(pnmcat -black -jleft -tb \ | |
| <(pngtopnm -alpha image139.png) \ | |
| <(pngtopnm -alpha image73.png) \ | |
| ) \ | |
| >test.png |
| // full recipe at https://swiftuirecipes.com/blog/swiftui-text-with-html-via-nsattributedstring | |
| extension Text { | |
| init(html htmlString: String, | |
| raw: Bool = false, | |
| size: CGFloat? = nil, | |
| fontFamily: String = "-apple-system") { | |
| let fullHTML: String | |
| if raw { | |
| fullHTML = htmlString | |
| } else { |
| extension UIHostingController { | |
| convenience public init(rootView: Content, ignoreSafeArea: Bool) { | |
| self.init(rootView: rootView) | |
| if ignoreSafeArea { | |
| disableSafeArea() | |
| } | |
| } | |
| func disableSafeArea() { |
| defaults write com.apple.Dock appswitcher-all-displays -bool true | |
| killall Dock |
| #!/bin/bash | |
| # Non-scripted Tasks: | |
| # - Configure device name in Preferences > Sharing | |
| # - Enable Remote Login & Remote Management in Preferences > Sharing | |
| # - Enable automatic login/disable password after sleep in Preferences > Security & Privacy > General | |
| # - Disable screensaver/sleep in Preferences > Energy Saver | |
| # - Disable spotlight indexing of home directory | |
| # - Add a runner in GitHub UI to grab your token https://github.com/<org>/<repo>/settings/actions/runners/new |
| import SwiftUI | |
| public struct FormattedTextField<Formatter: TextFieldFormatter>: View { | |
| public init(_ title: String, | |
| value: Binding<Formatter.Value>, | |
| formatter: Formatter) { | |
| self.title = title | |
| self.value = value | |
| self.formatter = formatter | |
| } |
| #!/usr/bin/env ruby | |
| # Sets in a pod the given build setting | |
| # | |
| # @param [Xcodeproj::Project] project | |
| # The xcode project instance. | |
| # | |
| # @param [Hash] build_settings | |
| # An hash with the build configurations | |
| # |
| #!/bin/bash | |
| # Script to disable the iOS Simulator app from showing the "Do you want the application xxxx to accept incoming network connections?" pop-up every time the app is run | |
| echo "> Enter password to temporarily shut firewall off" | |
| sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate off | |
| echo "> Add Xcode as a firewall exception" | |
| /usr/libexec/ApplicationFirewall/socketfilterfw --add /Applications/Xcode.app/Contents/MacOS/Xcode |