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
| """ | |
| The most atomic way to train and run inference for a GPT in pure, dependency-free Python. | |
| This file is the complete algorithm. | |
| Everything else is just efficiency. | |
| @karpathy | |
| """ | |
| import os # os.path.exists | |
| import math # math.log, math.exp |
April 2026 TLDR setup for Ollama + Gemma 4 on a Mac mini (Apple Silicon) — auto-start, preload, and keep-alive
Verified Spec-Driven Development (VSDD) is a unified software engineering methodology that fuses three proven paradigms into a single AI-orchestrated pipeline:
I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.
I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real
| #!/usr/bin/env python | |
| import os, os.path, stat, sys, base64 | |
| # TOTP lib inlined | |
| import time, hmac, base64, hashlib, struct | |
| def pack_counter(t): | |
| return struct.pack(">Q", t) |
| #!/usr/bin/env python | |
| #-*- coding:utf8 -*- | |
| # sources | |
| # 1. https://gist.github.com/tell-k/4943359#file-paramiko_proxycommand_sample-py-L11 | |
| # 2. https://github.com/paramiko/paramiko/pull/97 | |
| # info: http://bitprophet.org/blog/2012/11/05/gateway-solutions/ | |
| # local -> proxy-server -> dest-server | |
| # ~/.ssh/config | |
| # | |
| # Host proxy-server |
| Title | Description
One of the many reasons I love working with Ruby is it has a rich vocabulary that allows you to accomplish your goals with a minimal amount of code. If there isn't a method that does exactly what you want, it's usually possible to build an elegant solution yourself.
Let's take the example of simulating the rolling of a die.
We can represent a die as an array of its faces.
die = [*?⚀..?⚅]
# => ["⚀", "⚁", "⚂", "⚃", "⚄", "⚅"]| #include <assert.h> | |
| #include <stddef.h> | |
| #include <stdio.h> | |
| #define var __auto_type | |
| #define let __auto_type const | |
| static inline void * variant_cast(void * variant_ptr, ptrdiff_t desired_tag) { | |
| ptrdiff_t * variant_tag = (ptrdiff_t *)variant_ptr; | |
| assert(*variant_tag == desired_tag); |
| #!/usr/bin/env python2.7 | |
| from __future__ import print_function | |
| import commands | |
| import os | |
| import stat | |
| from gitlab import Gitlab | |
| def get_clone_commands(token, repo_root): | |
| con = Gitlab("http://gitlab.your.domain", token) |