Is it usually safe to go snowboarding five months after getting a total hip replacement?

Depends. Each surgeon will allow their patients to go back to different exercises and activities. Many physicians will allow their patients to ski, in a very casual, controlled manner after a joint replacement. This is a discussion you need to have with your particular surgeon. Prior to returning to any sports... Make sure your legs are very strong and up to task! :-).
Not Advisable. Although snowboarding is less "hip concerning" than skiing, it is still very concerning to consider snowboarding merely 5 months after total hip replacement. It would be better to wait until the next season. Also, it is advisable to talk with your surgeon before making this decision.
Yes. If you were a competent snowboarder before a total hip replacement, you should be able to return to that activity by 5 months afterward. You should stay within your limits and not be too aggressive to prevent a catastrophic fall.