Borrow, yes. Be inspired, yes.
But if I take some code/design and integrate it without fully understanding it (I'm discounting in this things which are meant to be used so- modules, plugins, and so forth) I feel like it's intellectually dishonest. Of course I won't understand fully in intricate detail the codestack of an apache module. But view-source is useful as a learning tool: how did they do it, how can I do something similar myself?
I'm at a point where examples like this give me a starting point for adapting a technique to my own uses. If I copy/pasted, not only would it be intellectually dishonest-when the customer requests something that would require the infringing block be modified, I'm doing q disservice to my customers: if I don't understand every inch of that code, I'll likely introduce a multitude of bugs and elongate development time unneccessarily compared to if I had written said code myself.
Disclaimer: mobile, +5 drinks.