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
| [ | |
| { | |
| "context": "Editor && (vim_mode == normal || vim_mode == visual) && !VimWaiting && !menu", | |
| "bindings": { | |
| // put key-bindings here if you want them to work in normal & visual mode | |
| // Git | |
| "space g h d": "editor::ToggleSelectedDiffHunks", | |
| "space g h r": "git::Restore", | |
| // Toggle inlay hints |
| # Obs: Work only in Firefox 66.x or prior, because the function "driver.switch_to.alert.send_keys" not work in new versions. | |
| # tested in selenium-webdriver (3.142.7), webdrivers (4.6.0) and firefox (66.0.5) | |
| # Download firefox to folder | |
| # config/initializers/selenium.rb | |
| Selenium::WebDriver::Firefox::Binary.path = 'path/to/firefox/66.x' | |
| # ----------------------------------------------------------------------------------------------------- | |
| # Code |
| ## template: jinja | |
| #cloud-config | |
| {% if v1.distro_release == 'focal' %} | |
| users: | |
| - name: berkant | |
| shell: /usr/bin/bash | |
| ssh_import_id: gh:berkant | |
| sudo: ALL=(ALL:ALL) NOPASSWD:ALL |
| #!/bin/sh | |
| # Sends command 'ATI' to modem #3 | |
| # Get a list of modems by running `mmcli -L` | |
| # Timeout is (probably) 2 seconds | |
| # Also see https://www.freedesktop.org/software/ModemManager/api/latest/gdbus-org.freedesktop.ModemManager1.Modem.html#gdbus-method-org-freedesktop-ModemManager1-Modem.Command | |
| dbus-send --system --dest=org.freedesktop.ModemManager1 --print-reply /org/freedesktop/ModemManager1/Modem/3 org.freedesktop.ModemManager1.Modem.Command string:'ATI' uint32:2000 |
| # Use this script to test that your Telegram bot works. | |
| # | |
| # Install the dependency | |
| # | |
| # $ gem install telegram_bot | |
| # | |
| # Run the bot | |
| # | |
| # $ ruby bot.rb | |
| # |
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "net" | |
| "time" | |
| ) | |
| // Dialer . |
| // junkterm is a quick and dirty serial terminal. | |
| package main | |
| import ( | |
| "io" | |
| "log" | |
| "os" | |
| "github.com/pkg/term" | |
| "github.com/spf13/cobra" |
| package main | |
| import ( | |
| "code.google.com/p/go.net/websocket" | |
| ) | |
| type connection struct { | |
| // The websocket connection. | |
| ws *websocket.Conn |