April 2026 TLDR setup for Ollama + Gemma 4 on a Mac mini (Apple Silicon) — auto-start, preload, and keep-alive
- Mac mini with Apple Silicon (M1/M2/M3/M4/M5)
- At least 16GB unified memory for Gemma 4 (default 8B)
- macOS with Homebrew installed
April 2026 TLDR setup for Ollama + Gemma 4 on a Mac mini (Apple Silicon) — auto-start, preload, and keep-alive
The Mac OS X 10.9 Mavericks download script is now hosted on Mavericks Forever. To download Mavericks, open a Terminal on any Mac and run:
curl mavericksforever.com/get.sh | sh
Or, navigate directly to mavericksforever.com/get.sh to read what the script does.
| // This playground shows you a few different ways to get device info via IOKit. | |
| // If you want to explore IOKit and look for interesting data I would download | |
| // the Additional Developer Tools from Apple and use the IORegistryExplorer app. | |
| // It makes it super easy to poke around in the IOKit planes. | |
| import IOKit | |
| import Foundation | |
| // For convient access we can make a computed getter for the PlatformExpert. | |
| // Traditionally this has been where you go to find all sorts of data about the |
| #!/bin/zsh | |
| # Test if the Swift compiler knows about a particular language feature. | |
| # | |
| # Usage: | |
| # | |
| # swift-has-feature [--swift SWIFT_PATH] [--language-version LANGUAGE_VERSION] FEATURE | |
| # | |
| # The feature should be an upcoming or experimental language feature, | |
| # such as `"StrictConcurrency"` or `"ExistentialAny"`. |
| import UIKit | |
| extension UIResponder { | |
| private weak static var _currentFirstResponder: UIResponder? = nil | |
| public static var current: UIResponder? { | |
| UIResponder._currentFirstResponder = nil | |
| UIApplication.shared.sendAction(#selector(findFirstResponder(sender:)), to: nil, from: nil, for: nil) | |
| return UIResponder._currentFirstResponder | |
| } |
| /// Wait for async operation to return value and call callback with the value | |
| /// This class is intended to workaround/simplify async/await + actors isolation | |
| /// https://twitter.com/krzyzanowskim/status/1523233140914876416 | |
| private class AsyncWaiter<T> { | |
| var didReceiveValue: Bool = false | |
| let value: (T) -> Void | |
| let operation: () async throws -> T | |
| init(_ value: @escaping (T) -> Void, operation: @escaping () async throws -> T) { | |
| self.value = value |
| /// MIT License | |
| /// | |
| /// Copyright (c) 2021 Lukas Kubanek, Structured Path GmbH | |
| /// | |
| /// Permission is hereby granted, free of charge, to any person obtaining a copy | |
| /// of this software and associated documentation files (the "Software"), to deal | |
| /// in the Software without restriction, including without limitation the rights | |
| /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| /// copies of the Software, and to permit persons to whom the Software is | |
| /// furnished to do so, subject to the following conditions: |
| require "formula" | |
| require_relative "lib/private_strategy" | |
| class Hoge < Formula | |
| homepage "https://github.com/yourcompany/hoge" | |
| url "https://github.com/yourcompany/hoge/releases/download/v0.1.0/hoge_v0.1.0_darwin_amd64.tar.gz", :using => GitHubPrivateRepositoryReleaseDownloadStrategy | |
| sha256 "6de411ff3e4b1658a413dd6181fcXXXXXXXXXXXXXXXXXXXX" | |
| head "https://github.com/yourcompany/hoge.git" | |
| version "0.1.0" |
| // Requirements: a NSLocationWhenInUseUsageDescription entry in Info.plist | |
| // Usage: @State var locator = CLLocationManager.publishLocation() | |
| // and | |
| // .onReceive(locator) { location in | |
| // Improvements needed: Move requestWhenInUseAuthorization into its own publisher and perhaps have a combineLatest pipeline for both authorized and valid location. | |
| // A configuration param to init(), e.g. so each manager can have the same distanceFilter. | |
| import Foundation | |
| import Combine | |
| import CoreLocation |
| // Copyright (c) 2019–25 Adam Sharp and thoughtbot, inc. | |
| // | |
| // Permission is hereby granted, free of charge, to any person obtaining a copy | |
| // of this software and associated documentation files (the "Software"), to deal | |
| // in the Software without restriction, including without limitation the rights | |
| // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| // copies of the Software, and to permit persons to whom the Software is | |
| // furnished to do so, subject to the following conditions: | |
| // | |
| // The above copyright notice and this permission notice shall be included in |