Show: If $f$ is a non-constant holomorphic function on a domain $G$, then $\lvert f\rvert$ has no local maximum on $G$. Hint: Use the mean value property of holomorphic functions!
Suppose that $\lvert f\rvert$ has a local maximum in $z_0\in G$. Then it exists a $r>0$ so that $\lvert f(z)\rvert \leq\lvert f(z_0)\rvert~\forall~z\in B(r,z_0)$. (*)
The mean value property says $$ f(z_0)=\frac{1}{2\pi}\int_0^{2\pi}f(z_0+re^{it})\, dt, $$ so it is, because of (*), $$ \lvert f(z_0)\rvert\leq\frac{1}{2\pi}\int_0^{2\pi}\lvert f(z_0+re^{it})\rvert\, dt\leq\frac{1}{2\pi}\int_0^{2\pi}\lvert f(z_0)\rvert\, dt=\lvert f(z_0)\rvert $$ and therefore $$ \lvert f(z_0)\rvert=\frac{1}{2\pi}\int_0^{2\pi}\lvert f(z_0+re^{it})\rvert\, dt. $$
Can I now use that result to get a contradiction?
The map $t\mapsto |f(z_0)|-|f(z_0+re^{it})|$ is non-negative, continuous, and its integral over $[0,2\pi]$ is $0$, hence for all $t\in [0,2\pi]$, we have that $|f(z_0+re^{it})|=|f(z_0)|$. It's true for $r$ small enough, hence the modulus of $f$ is constant on a ball centered on $z_0$. Using Cauchy-Riemann equations, it can be shown that $f$ is actually constant on the ball, and by connectedness on the domain.