I need to compute
$$\int_\gamma \frac{e^z-1}{z^2(z-1)}dz.$$
Where $0,1 \in \gamma$ where $\gamma$ winds $2$ times counterclock about $0$ and $2$ times clockwise about $1$. We have
\begin{align} \int_\gamma f(z) dz &=2 \pi i \bigg(2 \frac{d}{dz}(\frac{e^z-1}{z-1})\bigg\vert_{z=0} + (-2)\frac{e^z-1}{z^2}\bigg\vert_{z=1} \bigg)\\ &=2\pi i (-2-2(\frac{e-1}{1}))\\ &=-4\pi i - 4\pi i (e-1)\\ &=-4\pi i e \end{align}
Did I use the winding number correct in finding the result?
The winding number has been used correctly. A slightly different, rather detailed approach is taken here. We consider a small cycle $\gamma_1$ with center $0$, winding number $2$, not enclosing $1$ and a small cycle $\gamma_2$ with center $1$, winding number $-2$, not enclosing $0$.
Comment:
In (1) we split the integral using cycles $\gamma_1$ and $\gamma_2$ to separately enclose the isolated singularities.
In (2) we separate in $\int_{\gamma_1}$ the analytic part $\frac{e^z-1}{z}=1+\frac{z}{2}+\frac{z^2}{6}+\cdots$ when evaluated at $z=0$. We also do a partial fraction decomposition to separate the analytic term $\frac{1}{z-1}$ when evaluated at $z=0$.
In (3) we simplify the integrand of $\int_{\gamma_1}$ noting the integration over a closed curve of an analytic function is zero. We also separate the analytic part in $\int_{\gamma_2}$ when evaluated at $z=1$.
In (4) we apply the residue theorem.