Realigning your priorities after realizing death and impermanence It is very common to see people realigning their priorities after a near death experience or surviving a cancer. Things like money, career, fear of the future or anxiety don't bother them as much as before. 

In Buddhism how can one try to develop the same kind of behave? Only through meditation? Any specific meditation method to do it? (I thought about something related to death and impermanence, but it has to be something really powerful to achieve similar results)
The ancient extinct Kadampa school of Tibetan Buddhism (not the NKT, New Kadampa Tradition, which is an unsanctioned "breakaway" school) practiced mindfulness of death. Their motto was:


  Base your mind on the Dharma
  Base your Dharma on a humble life
  Base your humble life on the thought of death
  Base your death on an empty, barren hollow.  


"The Words of my Perfect Teacher" by Patrul Rinpoche explain this practice in the following way:


  While standing up, sitting or lying down, tell yourself: “This is my last act in this world”, and meditate on it with utter conviction. On your way to wherever you might be going, say to yourself: “Maybe I will die there. There is no certainty that I will ever come back.” When you set out on a journey or pause to rest, ask yourself: “Will I die here?” Wherever you are, you should wonder if this might be where you die. At night, when you lie down, ask yourself whether you might die in bed during the night or whether you can be sure that you are going to get up in the morning. When you rise, ask yourself whether you might die sometime during the day, and reflect that there is no certainty at all that you will be going to bed in the evening.


One Kadampa would always turn his bowl upside down when going to bed, and would not cover the hot ashes to last until morning. When asked why, he answered: "I really cannot say if I will wake up tomorrow".

Besides the ongoing mindfulness of death, there is also a formal meditation on death, which involves contemplating three points:


that we are sure to die,
that we can not predict time and circumstances of our death,
that when we die, there is nothing that can help us.