Actually using lye on your hair works. I smoked meth the day before my hair test and used a product containing lye, which is also known under another name, sodium hydroxide, and I passed.
There are a number of studies that have shown that hair relaxer, perming, dying of hair and bleaching, reduce the amount of metabolites in the hair. If you are a heavy user or frequent user, then there will still be high enough levels in the hair for you to fail. If you only used drugs a few times over several months, then these techniques can reduce the levels below the cut off point.