Using the method of Elias-Hogancamp and combinatorics of toric braids we give an explicit formula for the triply graded Khovanov-Rozansky homology of an arbitrary torus knot, thereby proving some of the conjectures of Aganagic-Shakirov, Cherednik, Gorsky-Negut and Oblomkov-Rasmussen-Shende.