Electromagnet and MOSFETS
The circuit in your link will work with almost any resistor values, and none of them depend on the electormanget you have.

As the text says, R1 should be between 100 ohm and 1 kiloohm. Check your parts drawer -- any resistor in this range will work. If you do not care, put a 100 ohm resistor. The exact value does not matter unless you are going to turn your magnet on and off very frequently.

R2 is a pull-down resistor. The pull down resistor value depend on the CPU, and is usually in the 1K to 100K range. I like to use 4.7k resistors because I have a big box of them.

As a reminder, make sure your MOSFET is sensitive enough for your microcontroller (this means you need "logic level gate").