Using Op-Amp for attenuation to give input to sound card
All you need is a resistor divider.  You have &plusmn;310 V and want to get that down to around &plusmn;1 V.  You therefore want to attenuate by about 300 in voltage.  A 30 k&Omega; resistor in series with the power line and 100 &Omega; to ground should do it theoretically.

However, you also need to look at some real world issues.  100 &Omega; is a good value for the second resistor because that will basically be the output impedance of the divider.  If you decide to pick that, then the other resistor needs to be around 30 k&Omega;.  That by itself is not a problem, but you can't just solder down a 0805 30 k&Omega; resistor.

First, consider the power dissipation in that resistor.  (220 V)&sup2;(30 k&Omega;) = 1.6 W.  That would require a "2 W" power resistor.  Another issue is the voltage standoff capability of the resistor.  It will have to be able to handle peaks up to 310 V, so should be rated for 350 or 400 V.

One way to achieve this is to put several smaller resistors in series.  That both spreads out the power dissipation and reduces the voltage across each.  Three "1 W" 10 k&Omega; resistor rated for 150 V or more in series will do nicely.

Keep in mind that the input to this circuit will have lethal voltages.  Make sure that this divider is well insulated.  For example, you could put all the resistor at the end of a line cord with only the attenuated output coming out, then wrap everything in layers of electrical tape.