Generally we just follow the original authors' credit rules, if any, then if we re-use source code we have to make sure the original author allows us to, then we just mention him in our readme and if lots of code is used, game. Then if they're not happy about it we follow their instructions.