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
This guide will walk you through adding a ChatGPT-like messaging stream to your Ruby on Rails 7 app using ruby-openai, Rails 7, Hotwire, Turbostream, Sidekiq and Tailwind. All code included below!
Want more content like this, for free? Check out my free book, RailsAI!
| package gogptindex | |
| import ( | |
| "context" | |
| _ "embed" | |
| "encoding/json" | |
| "fmt" | |
| "net/http" | |
| "os" | |
| "os/signal" |
This gist aims to provide a simple solution for managing Heroku Review Apps with GitHub Actions due to the security incident that continues to disrupt Heroku's GitHub integration. Watch the demo to learn more.
.github
├── workflows
│ ├── heroku_review_app_create.yml
| def uninterruptable_operation(iteration) | |
| puts "[INFO #{Time.now}] Start operation, iteration #{iteration}. Part " \ | |
| "one: Eg. we might long poll for messages here" | |
| sleep(5) | |
| puts "[INFO #{Time.now}] Operation part two. Eg. we might process " \ | |
| "messages here." | |
| sleep(1) |
| # syntax = docker/dockerfile:experimental | |
| FROM node | |
| ARG NPM_TOKEN=no | |
| ARG APP_ENV=production | |
| ENV AWS_DEFAULT_REGION=ams3 | |
| ARG AWS_ACCESS_KEY_ID | |
| ARG AWS_SECRET_ACCESS_KEY | |
| RUN pip install awscli |
| FROM centos:7 as builder | |
| RUN yum install -y git make gcc bzip2 openssl-devel libyaml-devel libffi-devel readline-devel zlib-devel gdbm-devel ncurses-devel && \ | |
| git clone https://github.com/rbenv/ruby-build.git && \ | |
| PREFIX=/usr/local ./ruby-build/install.sh | |
| ARG RUBY_VERSION | |
| ENV RUBY_VERSION=${RUBY_VERSION:-2.7.3} | |
| ENV RUBY_DIR=/usr/local/ruby-${RUBY_VERSION} | |
| RUN /usr/local/bin/ruby-build ${RUBY_VERSION} ${RUBY_DIR} |
Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ©️2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.
If you more tips and advice like these, you can become a monthly patron on my GitHub Sponsor Page for as little as $5 a month; and your contributions will be multipled, as GitHub is matching the first $5,000! This gist is all about Homebrew, so if you like it you can support it by donating to them or becoming one of their Github Sponsors.
| # Don't print a new line at the start of the prompt | |
| add_newline = false | |
| # Replace the "❯" symbol in the prompt with "➜" | |
| [character] # The name of the module we are configuring is "character" | |
| symbol = "➜" # The "symbol" segment is being set to "➜" | |
| error_symbol = "✗" | |
| use_symbol_for_status = true | |
| # Disable the package module, hiding it from the prompt completely |
This gist contains example of how you can configure nginx reverse-proxy with autmatic container discovery, SSL certificates generation (using Let's Encrypt) and auto updates.
Features: