Singaporean law forbids their citizens and residents from using drugs in other countries. So if a Singapore resident goes to Amsterdam or Portland and smokes a joint there, they are complying with local laws but still breaking Singaporean laws. Laws with this sort of extraterritorial jurisdiction aren't without precedent. Particularly, other countries, like the US, UK and many others, have similar laws concerning some forms of sex tourism.
https://en.wikipedia.org/wiki/Extraterritorial_jurisdiction
> Just because it might be a very pleasant place to live doesn't mean it isn't also totalitarian.
With that I agree, but I think a better word to describe Singapore is 'authoritarian.' Totalitarianism is an extreme form of authoritarianism, in which the government exercises a near total control over every aspect of your life. Singapore regulates many aspects of their citizens lives, as do all functional governments to at least some degree, but I think it falls short of totalitarianism.