where μB is the Bohr magneton, S is electron spin, and the g-factor gS is 2 according to Dirac's theory, but due to quantum electrodynamic effects it is slightly larger in reality: 2.002 319 304 36. The deviation from 2 is known as the anomalous magnetic dipole moment.
Again it is important to notice that m is a negative constant multiplied by the spin, so the magnetic moment of the electron is antiparallel to the spin. This can be understood with the following classical picture: if we imagine that the spin angular momentum is created by the electron mass spinning around some axis, the electric current that this rotation creates circulates in the opposite direction, because of the negative charge of the electron; such current loops produce a magnetic moment which is antiparallel to the spin. Hence, for a positron (the anti-particle of the electron) the magnetic moment is parallel to its spin.