You can release your other code under gpl 3 or agpl. If you or someone wants to use it in an mit licensed project you can license it to them under a special license that stipulates that it can only be used in that project and they must give back any changes. Lawyers, please confirm.