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
Beast Mode is a custom chat mode for VS Code agent that adds an opinionated workflow to the agent, including use of a todo list, extensive internet research capabilities, planning, tool usage instructions and more. Designed to be used with 4.1, although it will work with any model.
Below you will find the Beast Mode prompt in various versions - starting with the most recent - 3.1
| # settings we’re about to change | |
| osascript -e 'tell application "System Preferences" to quit' | |
| # Ask for the administrator password upfront | |
| sudo -v | |
| # Keep-alive: update existing `sudo` time stamp until `.macos` has finished | |
| while true; do | |
| sudo -n true | |
| sleep 60 | |
| kill -0 "$$" || exit |
| { | |
| resolve: `gatsby-plugin-gatsby-cloud`, // `gatsby-plugin-gatsby-cloud` | |
| options: { | |
| allPageHeaders: [ | |
| 'Strict-Transport-Security: max-age=31536000; includeSubDomains; preload', | |
| ], | |
| headers: { | |
| '/*': ['Cache-Control: public, max-age=31536000, immutable'], | |
| 'static/*': ['Cache-Control: public, max-age=31536000, immutable'], | |
| }, |
| // export const onInitialClientRender = () => { | |
| // // wait to init GTM until after React has hydrated in this lifecycle | |
| // const dataLayer = window.dataLayer || [] | |
| // dataLayer.push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' }) | |
| // } | |
| function initGTM() { | |
| if (window.isGTMLoaded) { | |
| return false | |
| } |
| import React from 'react' | |
| export const onRenderBody = ({ setHeadComponents }) => { | |
| setHeadComponents([ | |
| <link | |
| rel="preconnect" | |
| key="dns-prefetch-google-tag-manager" | |
| href="https://www.googletagmanager.com" | |
| as="script" | |
| />, |
| import { sample } from 'lodash'; | |
| import React from 'react'; | |
| import cookie from 'cookie'; | |
| import Layout from '../components/layout'; | |
| import HomeV1 from '../components/scenes/home/v1'; | |
| import HomeV2 from '../components/scenes/home/v2'; | |
| const EXPERIMENT_OPTIONS = { | |
| v1: HomeV1, | |
| v2: HomeV2, |
| // "@keystone-next/types": "^22.0.0", | |
| // "@keystone-next/keystone": "^22.0.0" | |
| // The actual lib | |
| // utils/keystone/cascadeDelete.ts | |
| import { ListHooks } from "@keystone-next/types" | |
| import { BaseGeneratedListTypes } from "@keystone-next/types/src/utils" | |
| type BeforeDeleteType = Exclude< | |
| ListHooks<BaseGeneratedListTypes>["beforeDelete"], |
| #!/bin/bash | |
| # This script will download the contents of a GitHub repo | |
| # and place them in a local directory. | |
| # | |
| # Usage: | |
| # download-repo.sh <repo> <output-path> <nested-path> <branch-name> | |
| # | |
| # Example: | |
| # download-repo.sh wattenberger/kumiko ./kumiko-assets master public/assets |
| import React from "react"; | |
| import styled from "styled-components"; | |
| import { storiesOf } from "@storybook/react"; | |
| import { text, withKnobs } from "@storybook/addon-knobs"; | |
| import { mobileViewport, addFullWidthWrapperDecorator } from "../utils"; | |
| import { Instagram } from "../../src/components/shared/Instagram"; | |
| /** Important pieces here. Images located in ../static/ */ | |
| import Instagram1 from "gatsby-image-fluid!../static/instagram_1.jpg"; |