If you are getting rid of your old washing machine, stop before you throw it out. Recycling the usable parts of an old machine makes a lot more sense than discarding them. If you have do-it-yourself skills, there are other uses you could put the motor to. Even if you have no such skills, the motor may be an item you could resell or gift to someone else.
Use the motor to build another device that needs moving parts. The simplest of these would be a fan. All this would require is a propeller to mount on the axle, and a protective cage to put it in.
You could also use the motor to make a belt sander. Many washing machines have a connection on the motor to a belt drive. This drive normally connects to the transmission of the washing machine. However, it could be adapted to move a sanding belt.
You could also use the motor to make a rock tumbler. A rock tumbler is basically a drum attached to a motor. As the rocks in the drum spin around, they chip away the rough edges and polish each other. A washing machine is basically a motor attached to a drum, much like a rock tumbler.
A DC motor is exactly the same thing as a DC generator. All of the parts are the same, they are just powered one way to make a motor and another way to make a generator. Some types of washing machine use large DC motors that can be removed along with their axles and bearings and reused as generators. You can use these motors to build a wind or water turbine, and turn the motion of a stream or the wind into electrical power. Though Fisher and Paykel washing machine motors are particularly well suited for this, any design is worth checking out.
When salvaging the motor, you may also wish to salvage certain other parts. If your washing machine's motor comes with a start capacitor, you will need to make sure that you get this device out as well. You may also wish to take the control along with the motor, as they could be used to easily regulate the motor's speed. These controls could be built into the controls of your new project.
Parts of the washing machine, such as the capacitors, may still have enough electrical charge stored in them to be dangerous. Wear protective gloves and goggles. If you do not know what you are doing with electricity, then do not attempt this or any other electrical salvage project.