(with apologies for a long post)
this is actually my field of research, although admittedly i work primarily with heavy users of Class A drugs who are pregnant and parenting. I can tell you that your few lines of cocaine will not have a significant effect on the development of your fetus. it does NOT cause deformities, and the research on mental development has yet to show any long-term effects (they have studied exposed children up to 7 years of age) longer term use of cocaine is likely to lead to low birth weight - which has been shown, in itself, to cause problems later in life, but that's the effect of the low birth weight and not the cocaine directly, if you see the difference.
Alcohol, in large quantities can be harmful, but the effects are generally mitigated by good maternal nutrition (i.e. - if you are well nourished prior to and during your pregnancy).
the absolute best things you can do for your pregnancy are to get good regular prenatal care, and to eat healthfully, as these 2 things seem to be the primary drivers of good birth outcomes for all women.
all that said - i am not advocating alcohol and drug use in pregnancy primarily because their use (i'm talking heavy use for alcohol) makes it less likely that you will eat well and generally take care of yourself.
feel free to email me off list if you need more resources.
And anyone should feel free to email me if they feel like sharing their experiences of recreational drug use and pregnancy/parenting (but that's just my researcher genes kicking in).
cheers! (from a fellow first-trimester-er)