Make the kerisik first. Put the shredded coconut in a dry skillet over medium-low heat and stir often for 6 to 9 minutes, until deep golden brown. While warm, pound or process until rough and oily, like a coarse paste. Set aside.
Blend the spice paste: shallots, garlic, ginger, galangal, lemongrass, soaked dried chilies, fresh chilies, turmeric, and water. Blend until smooth, scraping down the sides. It will be thick.
Heat the neutral oil in a heavy pot over medium heat. Add the spice paste and cook, stirring often, for 8 to 10 minutes, until it darkens a shade, thickens, and oil separates at the edges.
Add the beef cubes and the cinnamon, star anise, cardamom, cloves, and lime leaves. Cook 3 to 4 minutes, stirring, to coat the beef on all sides.
Pour in both cans of coconut milk with the tamarind paste, palm sugar, and salt. Bring to a gentle boil, stirring, then lower to a bare simmer.
Simmer low and uncovered for about 1 hour, stirring every 15 minutes. Keep the simmer gentle.
Stir in the kerisik. Keep simmering another 60 to 90 minutes, stirring more often as the sauce thickens, every 8 to 10 minutes near the end.
Cook until the sauce turns deep mahogany brown, oil pools and separates around the beef, and the sauce coats each piece. The beef should pull apart with a spoon. Total cook time is about 2 1/2 hours.
Rest 15 minutes off the heat. Remove the cinnamon stick, star anise, and lime leaves. Taste for salt, add lime juice now if used in place of tamarind, and serve over rice with cucumber.