It depends on my arrangement with a client. Work-for-hire contracts make reuse impossible, and so I tend to price higher, whereas a perpetual, transferable, etc. license to the code I work on has a better chance of being useful down the line and so I may knock a couple bucks off.
My thought was to develop a library for code re-use among clients. It would cover common problems/features. In your experience, do many contract workers have such a thing?
I dunno, but I wouldn't want to have such a thing in a stack. I reuse code like "hey, I've got this super nice Vagrant setup that makes life easier" or "I've got this Chef cookbook that's a little too specialized to meaningfully open-source but I can turn it around to help," rather than application-level code. If I had a library for application code-reuse, I'd just find a platform-appropriate library like Guava or something and try to get it in there, or open-source the whole thing myself.
I dunno about others, but I sure do! I have CSS stylesheets in 7 colour themes, a dozen bootstrap-like JS plugins that add common interactive elements I can drop into any site,
and tons of parts and pieces of layouts (like an order form, signup form, pricing chart, or media player) isolated and ready to re-use.
I also maintain a big snippets file, filled with HTML, CSS, JS, and command-line snippets and tricks so I can grab them from anywhere.
I dont know how any freelancer or contractor doesnt have a bag of tricks like this.
My responsive testing tool is located at: https://github.com/tomhodgins/speedtest You can use your keyboard keys 1-0 to test a variety of widths quickly, or use the buttons on mobile to test widths your phone or tablet can't physically emulate
You can also check out my CodePen profile, here's my collection of 'Front-end snippets', but I've got plenty more on there you can feel free to use or expand on: http://codepen.io/collection/nNqyvZ/
A foreign army invaded the South decades after that.