We propose a flexible scheme to prepare various kinds of useful entangled coherent states using weak cross-Kerr nonlinearities and strong laser fields. We then show that, with such entangled states as off-line resources, near-deterministic quantum gates needed for coherent-state-based quantum computation can be efficiently implemented by means of in-line linear-optics elements.