Technical documents to publish or not What can we do with the technical documentation we develop during our career?
Is it worth to publish? If so, where? 

I am considering those lines of code that we took time to write and that we usually only use in the first steps of our own publications, that we never actually added to the publication .. but saves all our colleagues (everyone one asks you to adjust your code to their needs...).

Is this a good way to guarantee that our colleagues give credit to the work previously developed by us?
It depends on whether the software is private or not. If it is public, you can either:


add your name to the AUTHORS file (you have one, right?).
ship the manual with the code.
slap a technical report number onto it, so that people will find it easier to cite.
write up a detailed description of what the software does, and publish it in a journal that publishes algorithms --- there are many of them.


If the code is a well-kept secret of your research group, not available even for sale, I am afraid there is very little you can do. People won't be interested in documentation of some code they cannot run themselves. You can still do 1--3, but don't expect people to read and cite it. 

Your only hope in that situation is that your co-authors are fair and acknowledge you appropriately whenever they use your code and documentation.