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
As with a lot of organisations, the idea of using LLM's is a reasonably frightning concept, as people freely hand over internal IP and sensitive comms to remote entities that are heavily data bound by nature. I know it was on our minds when deciding on LLM's and their role within the team and wider company. 6 months ago, I set out to explore what offerings were like in the self-hosted and/or OSS space, and if anything could be achieved locally. After using this setup since then, and after getting a lot of questions on it, I thought I might share some of the things I've come across and getting it all setup.
Que in Ollama and Continue. Ollama is an easy way to locally download, manage and run models. Its very familiar to Docker in its usuage, and can probably be most conceptually aligned with it in how it operates, think imag
| export default { | |
| async fetch(request) { | |
| let url = new URL(request.url); | |
| url.hostname = "www.vreme.si"; | |
| let newRequest = new Request(url, request); | |
| let response = await fetch(newRequest, { | |
| cf: { | |
| cacheTtl: 60, | |
| cacheEverything: true, |
| /* | |
| Generates a sitemap based on the entries in exportPathMap in next.config.js file | |
| Author: Joran Quinten | |
| Don't forget to add the domain name as process variable PUBLIC_DOMAIN! | |
| Trigger the file with a separate script in your package.json and add it to your build command in Netlify | |
| (for instance, set Build command to: "npm run production && npm run postexport") |
Live Table: https://diafygi.github.io/webcrypto-examples/
I couldn't find anywhere that had clear examples of WebCryptoAPI, so I wrote examples and made a live table with them. Pull requests welcome!
We did it! We broke gist.github.com ;) So head over to the new home! Thank you all!
2021.10.20: https://github.com/AveYo/MediaCreationTool.bat now open for interaction
Not just an Universal MediaCreationTool wrapper script with ingenious support for business editions,
A powerful yet simple windows 10 / 11 deployment automation tool as well!
| // components/Login/Login.js | |
| class Login extends Component { | |
| // ... | |
| handleSubmit(evt) { | |
| evt.preventDefault(); | |
| this.props.mutate(this.state) | |
| .then(({ data }) => { |
| function b2a(a) { | |
| var c, d, e, f, g, h, i, j, o, b = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", k = 0, l = 0, m = "", n = []; | |
| if (!a) return a; | |
| do c = a.charCodeAt(k++), d = a.charCodeAt(k++), e = a.charCodeAt(k++), j = c << 16 | d << 8 | e, | |
| f = 63 & j >> 18, g = 63 & j >> 12, h = 63 & j >> 6, i = 63 & j, n[l++] = b.charAt(f) + b.charAt(g) + b.charAt(h) + b.charAt(i); while (k < a.length); | |
| return m = n.join(""), o = a.length % 3, (o ? m.slice(0, o - 3) :m) + "===".slice(o || 3); | |
| } | |
| function a2b(a) { | |
| var b, c, d, e = {}, f = 0, g = 0, h = "", i = String.fromCharCode, j = a.length; |