Heavy flavour and quarkonia production measurement in pp and Pb-Pb collisions at LHC energies with the ALICE detector