One solution is to have an offline virtual machine that is configured not to speak to the public Internet, and do your coding in that. If you need to lookup something online, the host machine can do that and it can be copy and pasted from the host to the offline VM (Virtualbox allows you to do this).