  In this paper we obtain some extensions of the classical Krylov-Safonov
Harnack inequality. The novelty is that we consider functions that do not
necessarily satisfy an infinitesimal equation but rather exhibit a two-scale
behavior. We require that at scale larger than some $r_0>0$ (small) the
functions satisfy the comparison principle with a standard family of quadratic
polynomials, while at scale $r_0$ they satisfy a Weak Harnack type estimate.
  We also give several applications of the main result in very different
settings such as discrete difference equations, nonlocal equations,
homogenization and the quasi-minimal surfaces of Almgren.
