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.
// 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 |
You know the pain, you cloned a repo over HTTPS, and now Git asks you for your password each time you want to push or pull.
Chances are you already have the git credential-osxkeychain
command installed.
If not, just install Git with brew: brew install git
.
Once installed, just tell Git to use the KeyChain to store your credentials:
git config --global credential.helper osxkeychain