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
| // Ropp's main config | |
| // https://nilesoft.org/docs/functions/id | |
| // Cheatsheet: | |
| // Types: file|dir|drive|usb|dvd|fixed|vhd|removable|remote|back|desktop|namespace|computer|recyclebin|taskbar | |
| // remove... mod etc | |
| // multiple remove (find="view|sort|paste") | |
| // all not equal to remove(where=this.name!="shit") | |
| // type is file only remove (type="file" find="run as admin") | |
| // modify( find = value [property = value [...] ]) | |
| // |
| const tf = require('@tensorflow/tfjs-node'); | |
| const Jimp = require('jimp'); | |
| // Directory path for model files (model.json, metadata.json, weights.bin) | |
| // NOTE: It can be obtained from [Export Model] -> [Tensorflow.js] -> [Download my model] | |
| // on https://teachablemachine.withgoogle.com/train/image | |
| const MODEL_DIR_PATH = `${__dirname}`; | |
| // Path for image file to predict class | |
| const IMAGE_FILE_PATH = `${__dirname}/example.jpg`; |
| /** | |
| A Google Apps script for consolidating data from different sheets | |
| Basically, this scripts copies the contents from all sheets/tabs in a Google Sheet file, then consolidates all data in one tab: CombinedShet | |
| Created by Clara - claracommutes.com :) | |
| Important note: | |
| 1. Before using this Google Apps script, make sure that you have a sheet named CombinedSheet in your Google Sheet. This is where the script will consolidate all the data from all the other sheets. | |
| 2. CombinedSheet should be the last/rightmost tab in your Google Sheet file. |
| "use strict"; | |
| class MyCustomMaterial extends THREE.ShaderMaterial { | |
| // constructor takes appropriate parameters. | |
| // Default values using object destructuring (ES6) | |
| // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#Object_destructuring | |
| constructor({ | |
| color = 0xffffff, | |
| emissive = 0x000000, |
| // This code will automatically save the current canvas as a .png file. | |
| // Its useful as it can be placed in a loop to grab multiple canvas frames, I use it to create thumbnail gifs for my blog | |
| // Only seems to work with Chrome | |
| // Get the canvas | |
| var canvas = document.getElementById("canvas"); | |
| // Convert the canvas to data | |
| var image = canvas.toDataURL(); | |
| // Create a link | |
| var aDownloadLink = document.createElement('a'); |