Hi
First of all is it a cobra? In my experience Thais think every snake is a cobra.
I have found that most so called cobras are in fact common rat snakes or checkered keelbacks which are wannabe cobras.
Both of which are harmless in the case of the rat snake as the name inplies it is a welcome visitor if you have a rodent problem.
I know I have not answered your question on how to get rid of them but check out what make it is first! There is lots of info on tinternet and providing you don't have young children most snakes are more afraid of you than visa versa
TBWG
PS See pick of Keelback often confused with Cobra